CAKE-248 | displayed address as multiline text and changed insets in the qr_widget.dart; wrapped QRWidget by Observer in the address_page.dart

This commit is contained in:
OleksandrSobol 2021-01-26 19:43:43 +02:00
parent 6639d25264
commit d275ffe72b
2 changed files with 6 additions and 7 deletions

View file

@ -40,10 +40,10 @@ class AddressPage extends StatelessWidget {
children: <Widget>[
Expanded(
child: Center(
child: QRWidget(
child: Observer(builder: (_) => QRWidget(
addressListViewModel: addressListViewModel,
amountTextFieldFocusNode: _cryptoAmountFocus,
isAmountFieldShow: !addressListViewModel.hasAccounts),
isAmountFieldShow: !addressListViewModel.hasAccounts)),
)),
Observer(builder: (_) {
return addressListViewModel.hasAddressList

View file

@ -30,7 +30,6 @@ 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,
@ -54,7 +53,7 @@ class QRWidget extends StatelessWidget {
]),
isAmountFieldShow
? Padding(
padding: EdgeInsets.only(top: 40),
padding: EdgeInsets.only(top: 20),
child: Row(
children: <Widget>[
Expanded(
@ -90,7 +89,7 @@ class QRWidget extends StatelessWidget {
)
: Offstage(),
Padding(
padding: EdgeInsets.only(top: addressTopOffset),
padding: EdgeInsets.only(top: 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: <Widget>[
Expanded(
child: Text(
addressListViewModel.address.address,
maxLines: 1,
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.justify,
style: TextStyle(
fontSize: 15,
fontWeight: FontWeight.w500,