mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-22 18:54:47 +00:00
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:
commit
c3f38a9c54
3 changed files with 14 additions and 16 deletions
|
@ -39,12 +39,11 @@ class AddressPage extends StatelessWidget {
|
||||||
child: Column(
|
child: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Center(
|
child: Observer(builder: (_) => QRWidget(
|
||||||
child: 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
|
||||||
? GestureDetector(
|
? GestureDetector(
|
||||||
|
|
|
@ -120,7 +120,7 @@ class ReceivePage extends BasePage {
|
||||||
child: Column(
|
child: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.fromLTRB(24, 80, 24, 40),
|
padding: EdgeInsets.fromLTRB(24, 80, 24, 24),
|
||||||
child: QRWidget(
|
child: QRWidget(
|
||||||
addressListViewModel: addressListViewModel,
|
addressListViewModel: addressListViewModel,
|
||||||
isAmountFieldShow: true,
|
isAmountFieldShow: true,
|
||||||
|
|
|
@ -30,10 +30,10 @@ 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,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Row(children: <Widget>[
|
Row(children: <Widget>[
|
||||||
|
@ -52,9 +52,9 @@ class QRWidget extends StatelessWidget {
|
||||||
))))),
|
))))),
|
||||||
Spacer(flex: 3)
|
Spacer(flex: 3)
|
||||||
]),
|
]),
|
||||||
isAmountFieldShow
|
if (isAmountFieldShow)
|
||||||
? Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(top: 40),
|
padding: EdgeInsets.only(top: 20),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
|
@ -87,10 +87,9 @@ class QRWidget extends StatelessWidget {
|
||||||
fontWeight: FontWeight.w500))))
|
fontWeight: FontWeight.w500))))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
: Offstage(),
|
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(top: addressTopOffset),
|
padding: EdgeInsets.only(top: 20, bottom: 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.center,
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 15,
|
fontSize: 15,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
|
|
Loading…
Reference in a new issue