fixed format

This commit is contained in:
Serhii-Borodenko 2022-02-07 00:17:39 +02:00
parent ed0c43d864
commit 68c3304219

View file

@ -328,31 +328,35 @@ class ExchangeCardState extends State<ExchangeCard> {
buttonColor: widget.addressButtonsColor, buttonColor: widget.addressButtonsColor,
validator: widget.addressTextFieldValidator, validator: widget.addressTextFieldValidator,
onPushPasteButton: widget.onPushPasteButton, onPushPasteButton: widget.onPushPasteButton,
onPushAddressBookButton: widget.onPushAddressBookButton), onPushAddressBookButton: widget.onPushAddressBookButton
),
) )
: Padding( : Padding(
padding: EdgeInsets.only(top: 10), padding: EdgeInsets.only(top: 10),
child: Builder( child: Builder(
builder: (context) => Stack(children: <Widget>[ builder: (context) => Stack(
children: <Widget> [
BaseTextFormField( BaseTextFormField(
controller: addressController, controller: addressController,
readOnly: true, readOnly: true,
borderColor: Colors.transparent, borderColor: Colors.transparent,
suffixIcon: suffixIcon: SizedBox(
SizedBox(width: _isMoneroWallet ? 80 : 36), width: _isMoneroWallet ? 80 : 36
),
textStyle: TextStyle( textStyle: TextStyle(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Colors.white), color: Colors.white),
validator: widget.addressTextFieldValidator), validator: widget.addressTextFieldValidator
),
Positioned( Positioned(
top: 2, top: 2,
right: 0, right: 0,
child: SizedBox( child: SizedBox(
width: _isMoneroWallet ? 80 : 36, width: _isMoneroWallet ? 80 : 36,
child: Row(children: <Widget>[ child: Row(
if (_isMoneroWallet) children: <Widget>[
Padding( if (_isMoneroWallet) Padding(
padding: EdgeInsets.only(left: 10), padding: EdgeInsets.only(left: 10),
child: Container( child: Container(
width: 34, width: 34,
@ -360,11 +364,10 @@ class ExchangeCardState extends State<ExchangeCard> {
padding: EdgeInsets.only(top: 0), padding: EdgeInsets.only(top: 0),
child: InkWell( child: InkWell(
onTap: () async { onTap: () async {
final contact = final contact = await Navigator
await Navigator.of(context, .of(context, rootNavigator: true)
rootNavigator: true) .pushNamed(
.pushNamed(Routes Routes.pickerAddressBook);
.pickerAddressBook);
if (contact is ContactBase && if (contact is ContactBase &&
contact.address != null) { contact.address != null) {
@ -380,10 +383,8 @@ class ExchangeCardState extends State<ExchangeCard> {
decoration: BoxDecoration( decoration: BoxDecoration(
color: widget color: widget
.addressButtonsColor, .addressButtonsColor,
borderRadius: borderRadius: BorderRadius
BorderRadius.all( .all(Radius.circular(6))),
Radius.circular(
6))),
child: Image.asset( child: Image.asset(
'assets/images/open_book.png', 'assets/images/open_book.png',
color: Theme.of(context) color: Theme.of(context)
@ -401,23 +402,27 @@ class ExchangeCardState extends State<ExchangeCard> {
padding: EdgeInsets.only(top: 0), padding: EdgeInsets.only(top: 0),
child: InkWell( child: InkWell(
onTap: () { onTap: () {
Clipboard.setData(ClipboardData( Clipboard.setData(
text: addressController ClipboardData(
.text)); text: addressController.text));
showBar<void>( showBar<void>(
context, context, S.of(context)
S
.of(context)
.copied_to_clipboard); .copied_to_clipboard);
}, },
child: Container( child: Container(
padding: EdgeInsets.fromLTRB( padding: EdgeInsets
8, 8, 0, 8), .fromLTRB(8, 8, 0, 8),
color: Colors.transparent, color: Colors.transparent,
child: copyImage), child: copyImage),
))) ))
]))) )
])), ]
)
)
)
]
)
),
), ),
]), ]),
); );