diff --git a/lib/src/screens/dashboard/widgets/address_page.dart b/lib/src/screens/dashboard/widgets/address_page.dart index 060d71b09..7e4fb1c73 100644 --- a/lib/src/screens/dashboard/widgets/address_page.dart +++ b/lib/src/screens/dashboard/widgets/address_page.dart @@ -39,12 +39,11 @@ class AddressPage extends StatelessWidget { child: Column( children: [ Expanded( - child: Center( - child: QRWidget( - addressListViewModel: addressListViewModel, - amountTextFieldFocusNode: _cryptoAmountFocus, - isAmountFieldShow: !addressListViewModel.hasAccounts), - )), + child: Observer(builder: (_) => QRWidget( + addressListViewModel: addressListViewModel, + amountTextFieldFocusNode: _cryptoAmountFocus, + isAmountFieldShow: !addressListViewModel.hasAccounts)) + ), Observer(builder: (_) { return addressListViewModel.hasAddressList ? GestureDetector( diff --git a/lib/src/screens/receive/receive_page.dart b/lib/src/screens/receive/receive_page.dart index c441bd380..9201b9805 100644 --- a/lib/src/screens/receive/receive_page.dart +++ b/lib/src/screens/receive/receive_page.dart @@ -120,7 +120,7 @@ class ReceivePage extends BasePage { child: Column( children: [ Padding( - padding: EdgeInsets.fromLTRB(24, 80, 24, 40), + padding: EdgeInsets.fromLTRB(24, 80, 24, 24), child: QRWidget( addressListViewModel: addressListViewModel, isAmountFieldShow: true, diff --git a/lib/src/screens/receive/widgets/qr_widget.dart b/lib/src/screens/receive/widgets/qr_widget.dart index 8551c9746..0a4551ae6 100644 --- a/lib/src/screens/receive/widgets/qr_widget.dart +++ b/lib/src/screens/receive/widgets/qr_widget.dart @@ -30,10 +30,10 @@ class QRWidget extends StatelessWidget { Widget build(BuildContext context) { final copyImage = Image.asset('assets/images/copy_address.png', color: Theme.of(context).textTheme.subhead.decorationColor); - final addressTopOffset = isAmountFieldShow ? 60.0 : 40.0; return Column( mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.center, children: [ Row(children: [ @@ -52,9 +52,9 @@ class QRWidget extends StatelessWidget { ))))), Spacer(flex: 3) ]), - isAmountFieldShow - ? Padding( - padding: EdgeInsets.only(top: 40), + if (isAmountFieldShow) + Padding( + padding: EdgeInsets.only(top: 20), child: Row( children: [ Expanded( @@ -87,10 +87,9 @@ class QRWidget extends StatelessWidget { fontWeight: FontWeight.w500)))) ], ), - ) - : Offstage(), + ), Padding( - padding: EdgeInsets.only(top: addressTopOffset), + padding: EdgeInsets.only(top: 20, bottom: 20), child: Builder( builder: (context) => Observer( builder: (context) => GestureDetector( @@ -102,12 +101,12 @@ class QRWidget extends StatelessWidget { }, child: Row( mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.start, children: [ Expanded( child: Text( addressListViewModel.address.address, - maxLines: 1, - overflow: TextOverflow.ellipsis, + textAlign: TextAlign.center, style: TextStyle( fontSize: 15, fontWeight: FontWeight.w500,