mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-24 03:26:38 +00:00
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:
parent
6639d25264
commit
d275ffe72b
2 changed files with 6 additions and 7 deletions
|
@ -40,10 +40,10 @@ class AddressPage extends StatelessWidget {
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Center(
|
child: Center(
|
||||||
child: QRWidget(
|
child: Observer(builder: (_) => QRWidget(
|
||||||
addressListViewModel: addressListViewModel,
|
addressListViewModel: addressListViewModel,
|
||||||
amountTextFieldFocusNode: _cryptoAmountFocus,
|
amountTextFieldFocusNode: _cryptoAmountFocus,
|
||||||
isAmountFieldShow: !addressListViewModel.hasAccounts),
|
isAmountFieldShow: !addressListViewModel.hasAccounts)),
|
||||||
)),
|
)),
|
||||||
Observer(builder: (_) {
|
Observer(builder: (_) {
|
||||||
return addressListViewModel.hasAddressList
|
return addressListViewModel.hasAddressList
|
||||||
|
|
|
@ -30,7 +30,6 @@ class QRWidget extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final copyImage = Image.asset('assets/images/copy_address.png',
|
final copyImage = Image.asset('assets/images/copy_address.png',
|
||||||
color: Theme.of(context).textTheme.subhead.decorationColor);
|
color: Theme.of(context).textTheme.subhead.decorationColor);
|
||||||
final addressTopOffset = isAmountFieldShow ? 60.0 : 40.0;
|
|
||||||
|
|
||||||
return Column(
|
return Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
@ -54,7 +53,7 @@ class QRWidget extends StatelessWidget {
|
||||||
]),
|
]),
|
||||||
isAmountFieldShow
|
isAmountFieldShow
|
||||||
? Padding(
|
? Padding(
|
||||||
padding: EdgeInsets.only(top: 40),
|
padding: EdgeInsets.only(top: 20),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
|
@ -90,7 +89,7 @@ class QRWidget extends StatelessWidget {
|
||||||
)
|
)
|
||||||
: Offstage(),
|
: Offstage(),
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(top: addressTopOffset),
|
padding: EdgeInsets.only(top: 20),
|
||||||
child: Builder(
|
child: Builder(
|
||||||
builder: (context) => Observer(
|
builder: (context) => Observer(
|
||||||
builder: (context) => GestureDetector(
|
builder: (context) => GestureDetector(
|
||||||
|
@ -102,12 +101,12 @@ class QRWidget extends StatelessWidget {
|
||||||
},
|
},
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
addressListViewModel.address.address,
|
addressListViewModel.address.address,
|
||||||
maxLines: 1,
|
textAlign: TextAlign.justify,
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 15,
|
fontSize: 15,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
|
|
Loading…
Reference in a new issue