mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-10 21:04:53 +00:00
fixed format
This commit is contained in:
parent
ed0c43d864
commit
68c3304219
1 changed files with 116 additions and 111 deletions
|
@ -226,7 +226,7 @@ class ExchangeCardState extends State<ExchangeCard> {
|
||||||
.display1
|
.display1
|
||||||
.color,
|
.color,
|
||||||
borderRadius:
|
borderRadius:
|
||||||
BorderRadius.all(Radius.circular(6))),
|
BorderRadius.all(Radius.circular(6))),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () => widget.allAmount?.call(),
|
onTap: () => widget.allAmount?.call(),
|
||||||
child: Center(
|
child: Center(
|
||||||
|
@ -303,121 +303,126 @@ class ExchangeCardState extends State<ExchangeCard> {
|
||||||
? Padding(
|
? Padding(
|
||||||
padding: EdgeInsets.only(top: 20),
|
padding: EdgeInsets.only(top: 20),
|
||||||
child: AddressTextField(
|
child: AddressTextField(
|
||||||
focusNode: widget.addressFocusNode,
|
focusNode: widget.addressFocusNode,
|
||||||
controller: addressController,
|
controller: addressController,
|
||||||
placeholder: widget.hasRefundAddress
|
placeholder: widget.hasRefundAddress
|
||||||
? S.of(context).refund_address
|
? S.of(context).refund_address
|
||||||
: null,
|
: null,
|
||||||
options: [
|
options: [
|
||||||
AddressTextFieldOption.paste,
|
AddressTextFieldOption.paste,
|
||||||
AddressTextFieldOption.qrCode,
|
AddressTextFieldOption.qrCode,
|
||||||
AddressTextFieldOption.addressBook,
|
AddressTextFieldOption.addressBook,
|
||||||
],
|
],
|
||||||
isBorderExist: false,
|
isBorderExist: false,
|
||||||
textStyle: TextStyle(
|
textStyle: TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
color: Colors.white),
|
color: Colors.white),
|
||||||
hintStyle: TextStyle(
|
hintStyle: TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
color: Theme.of(context)
|
color: Theme.of(context)
|
||||||
.accentTextTheme
|
.accentTextTheme
|
||||||
.display4
|
.display4
|
||||||
.decorationColor),
|
.decorationColor),
|
||||||
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(
|
||||||
BaseTextFormField(
|
children: <Widget> [
|
||||||
controller: addressController,
|
BaseTextFormField(
|
||||||
readOnly: true,
|
controller: addressController,
|
||||||
borderColor: Colors.transparent,
|
readOnly: true,
|
||||||
suffixIcon:
|
borderColor: Colors.transparent,
|
||||||
SizedBox(width: _isMoneroWallet ? 80 : 36),
|
suffixIcon: SizedBox(
|
||||||
textStyle: TextStyle(
|
width: _isMoneroWallet ? 80 : 36
|
||||||
fontSize: 16,
|
),
|
||||||
fontWeight: FontWeight.w600,
|
textStyle: TextStyle(
|
||||||
color: Colors.white),
|
fontSize: 16,
|
||||||
validator: widget.addressTextFieldValidator),
|
fontWeight: FontWeight.w600,
|
||||||
Positioned(
|
color: Colors.white),
|
||||||
top: 2,
|
validator: widget.addressTextFieldValidator
|
||||||
right: 0,
|
),
|
||||||
child: SizedBox(
|
Positioned(
|
||||||
width: _isMoneroWallet ? 80 : 36,
|
top: 2,
|
||||||
child: Row(children: <Widget>[
|
right: 0,
|
||||||
if (_isMoneroWallet)
|
child: SizedBox(
|
||||||
Padding(
|
width: _isMoneroWallet ? 80 : 36,
|
||||||
padding: EdgeInsets.only(left: 10),
|
child: Row(
|
||||||
child: Container(
|
children: <Widget>[
|
||||||
width: 34,
|
if (_isMoneroWallet) Padding(
|
||||||
height: 34,
|
padding: EdgeInsets.only(left: 10),
|
||||||
padding: EdgeInsets.only(top: 0),
|
child: Container(
|
||||||
child: InkWell(
|
width: 34,
|
||||||
onTap: () async {
|
height: 34,
|
||||||
final contact =
|
padding: EdgeInsets.only(top: 0),
|
||||||
await Navigator.of(context,
|
child: InkWell(
|
||||||
rootNavigator: true)
|
onTap: () async {
|
||||||
.pushNamed(Routes
|
final contact = await Navigator
|
||||||
.pickerAddressBook);
|
.of(context, rootNavigator: true)
|
||||||
|
.pushNamed(
|
||||||
|
Routes.pickerAddressBook);
|
||||||
|
|
||||||
if (contact is ContactBase &&
|
if (contact is ContactBase &&
|
||||||
contact.address != null) {
|
contact.address != null) {
|
||||||
setState(() =>
|
setState(() =>
|
||||||
addressController.text =
|
addressController.text =
|
||||||
contact.address);
|
contact.address);
|
||||||
widget.onPushAddressBookButton
|
widget.onPushAddressBookButton
|
||||||
?.call(context);
|
?.call(context);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.all(8),
|
padding: EdgeInsets.all(8),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: widget
|
color: widget
|
||||||
.addressButtonsColor,
|
.addressButtonsColor,
|
||||||
borderRadius:
|
borderRadius: BorderRadius
|
||||||
BorderRadius.all(
|
.all(Radius.circular(6))),
|
||||||
Radius.circular(
|
child: Image.asset(
|
||||||
6))),
|
'assets/images/open_book.png',
|
||||||
child: Image.asset(
|
color: Theme.of(context)
|
||||||
'assets/images/open_book.png',
|
.primaryTextTheme
|
||||||
color: Theme.of(context)
|
.display1
|
||||||
.primaryTextTheme
|
.decorationColor,
|
||||||
.display1
|
)),
|
||||||
.decorationColor,
|
)),
|
||||||
)),
|
),
|
||||||
)),
|
Padding(
|
||||||
),
|
padding: EdgeInsets.only(left: 2),
|
||||||
Padding(
|
child: Container(
|
||||||
padding: EdgeInsets.only(left: 2),
|
width: 34,
|
||||||
child: Container(
|
height: 34,
|
||||||
width: 34,
|
padding: EdgeInsets.only(top: 0),
|
||||||
height: 34,
|
child: InkWell(
|
||||||
padding: EdgeInsets.only(top: 0),
|
onTap: () {
|
||||||
child: InkWell(
|
Clipboard.setData(
|
||||||
onTap: () {
|
ClipboardData(
|
||||||
Clipboard.setData(ClipboardData(
|
text: addressController.text));
|
||||||
text: addressController
|
showBar<void>(
|
||||||
.text));
|
context, S.of(context)
|
||||||
showBar<void>(
|
.copied_to_clipboard);
|
||||||
context,
|
},
|
||||||
S
|
child: Container(
|
||||||
.of(context)
|
padding: EdgeInsets
|
||||||
.copied_to_clipboard);
|
.fromLTRB(8, 8, 0, 8),
|
||||||
},
|
color: Colors.transparent,
|
||||||
child: Container(
|
child: copyImage),
|
||||||
padding: EdgeInsets.fromLTRB(
|
))
|
||||||
8, 8, 0, 8),
|
)
|
||||||
color: Colors.transparent,
|
]
|
||||||
child: copyImage),
|
)
|
||||||
)))
|
)
|
||||||
])))
|
)
|
||||||
])),
|
]
|
||||||
|
)
|
||||||
|
),
|
||||||
),
|
),
|
||||||
]),
|
]),
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue