Merge pull request #177 from cake-tech/CAKE-248-change-address-displaying-on-the-receive-screen

Cake 248 change address displaying on the receive screen
This commit is contained in:
M 2021-01-27 19:46:50 +02:00
commit c3f38a9c54
3 changed files with 14 additions and 16 deletions

View file

@ -39,12 +39,11 @@ class AddressPage extends StatelessWidget {
child: Column(
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
? GestureDetector(

View file

@ -120,7 +120,7 @@ class ReceivePage extends BasePage {
child: Column(
children: <Widget>[
Padding(
padding: EdgeInsets.fromLTRB(24, 80, 24, 40),
padding: EdgeInsets.fromLTRB(24, 80, 24, 24),
child: QRWidget(
addressListViewModel: addressListViewModel,
isAmountFieldShow: true,

View file

@ -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: <Widget>[
Row(children: <Widget>[
@ -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: <Widget>[
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: <Widget>[
Expanded(
child: Text(
addressListViewModel.address.address,
maxLines: 1,
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 15,
fontWeight: FontWeight.w500,