Redesigned bottom bar of main screen according Figma (#279)

* Redesigned bottom bar of main screen according Figma

* used receiced_icon from figma instead of that present in asset/image folder

* removed border colors for dark and light modes

* removed fixed width and height
This commit is contained in:
Rafia Rahman Chowdhury 2022-03-15 20:13:34 +06:00 committed by GitHub
parent d2cc812884
commit 987e6f21ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 57 additions and 41 deletions

BIN
assets/images/buy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
assets/images/received.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
assets/images/sell.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View file

@ -92,19 +92,23 @@ class DashboardPage extends BasePage {
@override @override
Widget body(BuildContext context) { Widget body(BuildContext context) {
final sendImage = Image.asset('assets/images/upload.png', final sendImage = Image.asset('assets/images/upload.png',
height: 22.24, height: 24,
width: 24,
color: Theme.of(context).accentTextTheme.display3.backgroundColor);
final receiveImage = Image.asset('assets/images/received.png',
height: 24,
width: 24, width: 24,
color: Theme.of(context).accentTextTheme.display3.backgroundColor); color: Theme.of(context).accentTextTheme.display3.backgroundColor);
final exchangeImage = Image.asset('assets/images/transfer.png', final exchangeImage = Image.asset('assets/images/transfer.png',
height: 24.27, height: 24,
width: 22.25,
color: Theme.of(context).accentTextTheme.display3.backgroundColor);
final buyImage = Image.asset('assets/images/coins.png',
height: 22.24,
width: 24, width: 24,
color: Theme.of(context).accentTextTheme.display3.backgroundColor); color: Theme.of(context).accentTextTheme.display3.backgroundColor);
final sellImage = Image.asset('assets/images/restore_wallet_image.png', final buyImage = Image.asset('assets/images/buy.png',
height: 22.24, height: 24,
width: 24,
color: Theme.of(context).accentTextTheme.display3.backgroundColor);
final sellImage = Image.asset('assets/images/sell.png',
height: 24,
width: 24, width: 24,
color: Theme.of(context).accentTextTheme.display3.backgroundColor); color: Theme.of(context).accentTextTheme.display3.backgroundColor);
_setEffects(context); _setEffects(context);
@ -134,25 +138,39 @@ class DashboardPage extends BasePage {
.display1 .display1
.backgroundColor), .backgroundColor),
)), )),
Container(
padding: EdgeInsets.only(left: 45, right: 45, bottom: 24), ClipRect(
child:Container(
margin: const EdgeInsets.only(left: 16, right: 16, bottom: 38),
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(50.0),
border: Border.all(color: currentTheme.type == ThemeType.bright ? Color.fromRGBO(255, 255, 255, 0.2): Colors.transparent, width: 1, ),
color:Theme.of(context).textTheme.title.backgroundColor
),
child: Container(
padding: EdgeInsets.only(left: 32, right: 32, bottom: 14, top: 16),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
ActionButton(
image: sendImage,
title: S.of(context).send,
route: Routes.send),
ActionButton(
image: exchangeImage,
title: S.of(context).exchange,
route: Routes.exchange),
if (!isMoneroOnly) if (!isMoneroOnly)
ActionButton( ActionButton(
image: buyImage, image: buyImage,
title: S.of(context).buy, title: S.of(context).buy,
onClick: () async => await _onClickBuyButton(context), onClick: () async => await _onClickBuyButton(context),
), ),
ActionButton(
image: receiveImage,
title: S.of(context).receive,
route: Routes.receive),
ActionButton(
image: exchangeImage,
title: S.of(context).exchange,
route: Routes.exchange),
ActionButton(
image: sendImage,
title: S.of(context).send,
route: Routes.send),
if (!isMoneroOnly) if (!isMoneroOnly)
ActionButton( ActionButton(
image: sellImage, image: sellImage,
@ -160,8 +178,9 @@ class DashboardPage extends BasePage {
onClick: () async => await _onClickSellButton(context), onClick: () async => await _onClickSellButton(context),
), ),
], ],
), ),),
) ),),),
], ],
)); ));
} }

View file

@ -20,7 +20,6 @@ class ActionButton extends StatelessWidget {
alignment: alignment, alignment: alignment,
child: Column( child: Column(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
GestureDetector( GestureDetector(
@ -32,19 +31,17 @@ class ActionButton extends StatelessWidget {
} }
}, },
child: Container( child: Container(
height: 60,
width: 60,
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).buttonColor, shape: BoxShape.circle), shape: BoxShape.circle),
child: image, child: image,
), ),
), ),
SizedBox(height: 15), SizedBox(height: 4),
Text( Text(
title, title,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 10,
color: Theme.of(context).accentTextTheme.display3 color: Theme.of(context).accentTextTheme.display3
.backgroundColor), .backgroundColor),
) )