Merge pull request #66 from cake-tech/CWA-219-bug-fix-2

Cwa 219 bug fix 2
wownero
Oleksandr Sobol 4 years ago committed by GitHub
commit 872dbeb8ac

@ -121,6 +121,8 @@ class S implements WidgetsLocalizations {
String get payment_id => "Payment ID: ";
String get pending => " (pending)";
String get pin_is_incorrect => "PIN is incorrect";
String get placeholder_contacts => "Your contacts will be displayed here";
String get placeholder_transactions => "Your transactions will be displayed here";
String get please_make_selection => "Please make selection below to create or recover your wallet.";
String get please_select => "Please select:";
String get please_try_to_connect_to_another_node => "Please try to connect to another node";
@ -392,6 +394,8 @@ class $de extends S {
@override
String get wallet_list_create_new_wallet => "Neue Wallet erstellen";
@override
String get placeholder_contacts => "Ihre Kontakte werden hier angezeigt";
@override
String get card_address => "Adresse:";
@override
String get seed_language_portuguese => "Portugiesisch";
@ -462,6 +466,8 @@ class $de extends S {
@override
String get settings_display_balance_as => "Kontostand anzeigen als";
@override
String get placeholder_transactions => "Ihre Transaktionen werden hier angezeigt";
@override
String get trade_details_provider => "Anbieter";
@override
String get seed_language_japanese => "Japanisch";
@ -1008,6 +1014,8 @@ class $hi extends S {
@override
String get wallet_list_create_new_wallet => "नया बटुआ बनाएँ";
@override
String get placeholder_contacts => "आपके संपर्क यहां प्रदर्शित होंगे";
@override
String get card_address => "पता:";
@override
String get seed_language_portuguese => "पुर्तगाली";
@ -1078,6 +1086,8 @@ class $hi extends S {
@override
String get settings_display_balance_as => "के रूप में संतुलन प्रदर्शित करें";
@override
String get placeholder_transactions => "आपके लेनदेन यहां प्रदर्शित होंगे";
@override
String get trade_details_provider => "प्रदाता";
@override
String get seed_language_japanese => "जापानी";
@ -1624,6 +1634,8 @@ class $ru extends S {
@override
String get wallet_list_create_new_wallet => "Создать новый кошелёк";
@override
String get placeholder_contacts => "Ваши контакты будут отображаться здесь";
@override
String get card_address => "Адрес:";
@override
String get seed_language_portuguese => "Португальский";
@ -1694,6 +1706,8 @@ class $ru extends S {
@override
String get settings_display_balance_as => "Отображать баланс как";
@override
String get placeholder_transactions => "Ваши транзакции будут отображаться здесь";
@override
String get trade_details_provider => "Провайдер";
@override
String get seed_language_japanese => "Японский";
@ -2240,6 +2254,8 @@ class $ko extends S {
@override
String get wallet_list_create_new_wallet => "새 월렛 만들기";
@override
String get placeholder_contacts => "연락처가 여기에 표시됩니다";
@override
String get card_address => "주소:";
@override
String get seed_language_portuguese => "포르투갈 인";
@ -2310,6 +2326,8 @@ class $ko extends S {
@override
String get settings_display_balance_as => "잔액 표시";
@override
String get placeholder_transactions => "거래가 여기에 표시됩니다";
@override
String get trade_details_provider => "공급자";
@override
String get seed_language_japanese => "일본어";
@ -2856,6 +2874,8 @@ class $pt extends S {
@override
String get wallet_list_create_new_wallet => "Criar nova carteira";
@override
String get placeholder_contacts => "Seus contatos serão exibidos aqui";
@override
String get card_address => "Endereço:";
@override
String get seed_language_portuguese => "Português";
@ -2926,6 +2946,8 @@ class $pt extends S {
@override
String get settings_display_balance_as => "Saldo a exibir";
@override
String get placeholder_transactions => "Suas transações serão exibidas aqui";
@override
String get trade_details_provider => "Provedor";
@override
String get seed_language_japanese => "Japonês";
@ -3472,6 +3494,8 @@ class $uk extends S {
@override
String get wallet_list_create_new_wallet => "Створити новий гаманець";
@override
String get placeholder_contacts => "Тут будуть показані ваші контакти";
@override
String get card_address => "Адреса:";
@override
String get seed_language_portuguese => "Португальська";
@ -3542,6 +3566,8 @@ class $uk extends S {
@override
String get settings_display_balance_as => "Відображати баланс як";
@override
String get placeholder_transactions => "Тут відображатимуться ваші транзакції";
@override
String get trade_details_provider => "Провайдер";
@override
String get seed_language_japanese => "Японська";
@ -4088,6 +4114,8 @@ class $ja extends S {
@override
String get wallet_list_create_new_wallet => "新しいウォレットを作成";
@override
String get placeholder_contacts => "連絡先はここに表示されます";
@override
String get card_address => "住所:";
@override
String get seed_language_portuguese => "ポルトガル語";
@ -4158,6 +4186,8 @@ class $ja extends S {
@override
String get settings_display_balance_as => "残高を表示";
@override
String get placeholder_transactions => "あなたの取引はここに表示されます";
@override
String get trade_details_provider => "プロバイダー";
@override
String get seed_language_japanese => "日本語";
@ -4708,6 +4738,8 @@ class $pl extends S {
@override
String get wallet_list_create_new_wallet => "Utwórz nowy portfel";
@override
String get placeholder_contacts => "Twoje kontakty zostaną wyświetlone tutaj";
@override
String get card_address => "Adres:";
@override
String get seed_language_portuguese => "Portugalski";
@ -4778,6 +4810,8 @@ class $pl extends S {
@override
String get settings_display_balance_as => "Wyświetl saldo jako";
@override
String get placeholder_transactions => "Twoje transakcje zostaną wyświetlone tutaj";
@override
String get trade_details_provider => "Dostawca";
@override
String get seed_language_japanese => "Japoński";
@ -5324,6 +5358,8 @@ class $es extends S {
@override
String get wallet_list_create_new_wallet => "Crear nueva billetera";
@override
String get placeholder_contacts => "Tus contactos se mostrarán aquí";
@override
String get card_address => "Dirección:";
@override
String get seed_language_portuguese => "Portugués";
@ -5394,6 +5430,8 @@ class $es extends S {
@override
String get settings_display_balance_as => "Mostrar saldo como";
@override
String get placeholder_transactions => "Sus transacciones se mostrarán aquí";
@override
String get trade_details_provider => "Proveedor";
@override
String get seed_language_japanese => "Japonés";
@ -5940,6 +5978,8 @@ class $nl extends S {
@override
String get wallet_list_create_new_wallet => "Maak een nieuwe portemonnee";
@override
String get placeholder_contacts => "Je contacten worden hier weergegeven";
@override
String get card_address => "Adres:";
@override
String get seed_language_portuguese => "Portugees";
@ -6010,6 +6050,8 @@ class $nl extends S {
@override
String get settings_display_balance_as => "Toon saldo als";
@override
String get placeholder_transactions => "Uw transacties worden hier weergegeven";
@override
String get trade_details_provider => "Leverancier";
@override
String get seed_language_japanese => "Japans";
@ -6556,6 +6598,8 @@ class $zh extends S {
@override
String get wallet_list_create_new_wallet => "创建新钱包";
@override
String get placeholder_contacts => "您的聯繫人將顯示在這裡";
@override
String get card_address => "地址:";
@override
String get seed_language_portuguese => "葡萄牙語";
@ -6626,6 +6670,8 @@ class $zh extends S {
@override
String get settings_display_balance_as => "将余额显示为";
@override
String get placeholder_transactions => "您的交易將顯示在這裡";
@override
String get trade_details_provider => "提供者";
@override
String get seed_language_japanese => "日本";

@ -64,148 +64,163 @@ class AddressBookPage extends BasePage {
color: Theme.of(context).backgroundColor,
padding: EdgeInsets.only(top: 20.0, bottom: 20.0),
child: Observer(
builder: (_) => ListView.separated(
separatorBuilder: (_, __) => Container(
height: 1,
padding: EdgeInsets.only(left: 24),
color: Theme.of(context).accentTextTheme.title.backgroundColor,
child: Container(
builder: (_) {
final count = addressBookStore.contactList == null
? 0
: addressBookStore.contactList.length;
return count > 0
? ListView.separated(
separatorBuilder: (_, __) => Container(
height: 1,
color: Theme.of(context).dividerColor,
padding: EdgeInsets.only(left: 24),
color: Theme.of(context).accentTextTheme.title.backgroundColor,
child: Container(
height: 1,
color: Theme.of(context).dividerColor,
),
),
),
itemCount: addressBookStore.contactList == null
? 0
: addressBookStore.contactList.length,
itemBuilder: (BuildContext context, int index) {
final contact = addressBookStore.contactList[index];
final image = _getCurrencyImage(contact.type);
itemCount: count,
itemBuilder: (BuildContext context, int index) {
final contact = addressBookStore.contactList[index];
final image = _getCurrencyImage(contact.type);
final isDrawTop = index == 0 ? true : false;
final isDrawBottom = index == addressBookStore.contactList.length - 1 ? true : false;
final isDrawTop = index == 0 ? true : false;
final isDrawBottom = index == addressBookStore.contactList.length - 1 ? true : false;
final content = GestureDetector(
onTap: () async {
if (!isEditable) {
Navigator.of(context).pop(contact);
return;
}
final content = GestureDetector(
onTap: () async {
if (!isEditable) {
Navigator.of(context).pop(contact);
return;
}
final isCopied = await showNameAndAddressDialog(
context, contact.name, contact.address);
final isCopied = await showNameAndAddressDialog(
context, contact.name, contact.address);
if (isCopied != null && isCopied) {
await Clipboard.setData(
ClipboardData(text: contact.address));
Scaffold.of(context).showSnackBar(
SnackBar(
content: Text(
S.of(context).copied_to_clipboard,
style: TextStyle(
color: Colors.white
if (isCopied != null && isCopied) {
await Clipboard.setData(
ClipboardData(text: contact.address));
Scaffold.of(context).showSnackBar(
SnackBar(
content: Text(
S.of(context).copied_to_clipboard,
style: TextStyle(
color: Colors.white
),
),
backgroundColor: Colors.green,
duration: Duration(milliseconds: 1500),
),
backgroundColor: Colors.green,
duration: Duration(milliseconds: 1500),
),
);
}
},
child: Column(
children: <Widget>[
isDrawTop
? Container(
width: double.infinity,
height: 1,
color: Theme.of(context).dividerColor,
)
: Offstage(),
Container(
width: double.infinity,
color: Theme.of(context).accentTextTheme.title.backgroundColor,
child: Padding(
padding: const EdgeInsets.only(left: 24, top: 16, bottom: 16, right: 24),
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
image != null
? image
: Offstage(),
Padding(
padding: image != null
? EdgeInsets.only(left: 12)
: EdgeInsets.only(left: 0),
child: Text(
contact.name,
style: TextStyle(
fontSize: 14,
color: Theme.of(context).primaryTextTheme.title.color
),
),
);
}
},
child: Column(
children: <Widget>[
isDrawTop
? Container(
width: double.infinity,
height: 1,
color: Theme.of(context).dividerColor,
)
: Offstage(),
Container(
width: double.infinity,
color: Theme.of(context).accentTextTheme.title.backgroundColor,
child: Padding(
padding: const EdgeInsets.only(left: 24, top: 16, bottom: 16, right: 24),
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
image != null
? image
: Offstage(),
Padding(
padding: image != null
? EdgeInsets.only(left: 12)
: EdgeInsets.only(left: 0),
child: Text(
contact.name,
style: TextStyle(
fontSize: 14,
color: Theme.of(context).primaryTextTheme.title.color
),
),
)
],
)
],
)
),
),
),
isDrawBottom
? Container(
width: double.infinity,
height: 1,
color: Theme.of(context).dividerColor,
)
: Offstage(),
],
),
);
isDrawBottom
? Container(
width: double.infinity,
height: 1,
color: Theme.of(context).dividerColor,
)
: Offstage(),
],
),
);
return !isEditable
? content
: Slidable(
key: Key('${contact.key}'),
actionPane: SlidableDrawerActionPane(),
child: content,
secondaryActions: <Widget>[
IconSlideAction(
caption: S.of(context).edit,
color: Colors.blue,
icon: Icons.edit,
onTap: () async {
await Navigator.of(context).pushNamed(
Routes.addressBookAddContact,
arguments: contact);
return !isEditable
? content
: Slidable(
key: Key('${contact.key}'),
actionPane: SlidableDrawerActionPane(),
child: content,
secondaryActions: <Widget>[
IconSlideAction(
caption: S.of(context).edit,
color: Colors.blue,
icon: Icons.edit,
onTap: () async {
await Navigator.of(context).pushNamed(
Routes.addressBookAddContact,
arguments: contact);
await addressBookStore.updateContactList();
},
),
IconSlideAction(
caption: S.of(context).delete,
color: Colors.red,
icon: CupertinoIcons.delete,
onTap: () async {
await showAlertDialog(context)
.then((isDelete) async {
if (isDelete != null && isDelete) {
await addressBookStore.delete(
contact: contact);
await addressBookStore.updateContactList();
},
),
IconSlideAction(
caption: S.of(context).delete,
color: Colors.red,
icon: CupertinoIcons.delete,
onTap: () async {
await showAlertDialog(context)
.then((isDelete) async {
if (isDelete != null && isDelete) {
await addressBookStore.delete(
contact: contact);
await addressBookStore.updateContactList();
}
});
},
),
],
dismissal: SlidableDismissal(
child: SlidableDrawerDismissal(),
onDismissed: (actionType) async {
await addressBookStore.delete(contact: contact);
await addressBookStore.updateContactList();
},
onWillDismiss: (actionType) async {
return await showAlertDialog(context);
},
),
);
}),
}
});
},
),
],
dismissal: SlidableDismissal(
child: SlidableDrawerDismissal(),
onDismissed: (actionType) async {
await addressBookStore.delete(contact: contact);
await addressBookStore.updateContactList();
},
onWillDismiss: (actionType) async {
return await showAlertDialog(context);
},
),
);
})
: Center(
child: Text(
S.of(context).placeholder_contacts,
textAlign: TextAlign.center,
style: TextStyle(
color: Theme.of(context).primaryTextTheme.caption.color.withOpacity(0.5),
fontSize: 14
),
),
);
},
));
}

@ -14,6 +14,7 @@ import 'date_section_raw.dart';
import 'trade_row.dart';
import 'transaction_raw.dart';
import 'button_header.dart';
import 'package:cake_wallet/generated/i18n.dart';
class TradeHistoryPanel extends StatefulWidget {
@override
@ -88,6 +89,18 @@ class TradeHistoryPanelState extends State<TradeHistoryPanel> {
height: freeSpaceHeight,
width: MediaQuery.of(context).size.width,
color: Theme.of(context).backgroundColor,
child: itemsCount > 1
? Offstage()
: Center(
child: Text(
S.of(context).placeholder_transactions,
textAlign: TextAlign.center,
style: TextStyle(
color: Theme.of(context).primaryTextTheme.caption.color.withOpacity(0.5),
fontSize: 14
),
),
),
);
}

@ -279,6 +279,7 @@ class WalletCardState extends State<WalletCard> {
balance,
style: TextStyle(
fontSize: 28,
height: 1,
color: Theme.of(context).primaryTextTheme.title.color
),
)
@ -288,6 +289,7 @@ class WalletCardState extends State<WalletCard> {
fiatBalance,
style: TextStyle(
fontSize: 14,
height: 2,
color: Theme.of(context).primaryTextTheme.title.color
),
)

@ -10,6 +10,7 @@ import 'package:cake_wallet/src/screens/base_page.dart';
import 'package:cake_wallet/src/stores/exchange_template/exchange_template_store.dart';
import 'package:cake_wallet/src/screens/exchange/widgets/present_provider_picker.dart';
import 'package:cake_wallet/src/screens/exchange/widgets/base_exchange_widget.dart';
import 'package:cake_wallet/src/widgets/clear_button.dart';
class ExchangePage extends BasePage {
@override
@ -32,20 +33,8 @@ class ExchangePage extends BasePage {
Widget trailing(BuildContext context) {
final exchangeStore = Provider.of<ExchangeStore>(context);
return ButtonTheme(
minWidth: double.minPositive,
highlightColor: Colors.transparent,
splashColor: Colors.transparent,
child: FlatButton(
padding: EdgeInsets.all(0),
child: Text(
S.of(context).clear,
style: TextStyle(
color: Theme.of(context).primaryTextTheme.caption.color,
fontWeight: FontWeight.w500,
fontSize: 14),
),
onPressed: () => exchangeStore.reset()),
return ClearButton(
onPressed: () => exchangeStore.reset()
);
}

@ -29,6 +29,7 @@ import 'package:cake_wallet/src/screens/send/widgets/confirm_sending_alert.dart'
import 'package:cake_wallet/src/screens/send/widgets/sending_alert.dart';
import 'package:cake_wallet/src/widgets/template_tile.dart';
import 'package:cake_wallet/src/stores/send_template/send_template_store.dart';
import 'package:cake_wallet/src/widgets/clear_button.dart';
class SendPage extends BasePage {
@override
@ -47,25 +48,8 @@ class SendPage extends BasePage {
Widget trailing(context) {
final sendStore = Provider.of<SendStore>(context);
return Container(
height: 32,
width: 82,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(16)),
color: Theme.of(context).accentTextTheme.title.color
),
child: ButtonTheme(
minWidth: double.minPositive,
child: FlatButton(
onPressed: () => sendStore.clear(),
child: Text(
S.of(context).clear,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 10.0,
color: Colors.blue),
)),
),
return ClearButton(
onPressed: () => sendStore.clear()
);
}

@ -24,6 +24,7 @@ import 'package:cake_wallet/src/screens/settings/widgets/settings_link_list_row.
import 'package:cake_wallet/src/screens/settings/widgets/settings_switch_list_row.dart';
import 'package:cake_wallet/src/screens/settings/widgets/settings_text_list_row.dart';
import 'package:cake_wallet/src/screens/settings/widgets/settings_raw_widget_list_row.dart';
import 'package:cake_wallet/src/screens/settings/widgets/fiat_currency_picker.dart';
class SettingsPage extends BasePage {
@override
@ -409,13 +410,13 @@ class SettingsFormState extends State<SettingsForm> {
final selectedItem = items.indexOf(settingsStore.fiatCurrency);
await showDialog<void>(
builder: (_) => Picker(
items: items,
selectedAtIndex: selectedItem,
title: S.of(context).please_select,
mainAxisAlignment: MainAxisAlignment.center,
onItemSelected: (FiatCurrency currency) async =>
await settingsStore.setCurrentFiatCurrency(currency: currency)),
builder: (_) => FiatCurrencyPicker(
selectedAtIndex: selectedItem,
items: items,
title: S.of(context).please_select,
onItemSelected: (currency) async =>
await settingsStore.setCurrentFiatCurrency(currency: currency)
),
context: context);
}

@ -0,0 +1,111 @@
import 'dart:ui';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:cake_wallet/palette.dart';
import 'package:cake_wallet/src/domain/common/fiat_currency.dart';
class FiatCurrencyPicker extends StatelessWidget {
FiatCurrencyPicker({
@required this.selectedAtIndex,
@required this.items,
@required this.title,
@required this.onItemSelected,
});
final int selectedAtIndex;
final List<FiatCurrency> items;
final String title;
final Function(FiatCurrency) onItemSelected;
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () => Navigator.of(context).pop(),
child: Container(
color: Colors.transparent,
child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 3.0, sigmaY: 3.0),
child: Container(
decoration: BoxDecoration(color: PaletteDark.darkNightBlue.withOpacity(0.75)),
child: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Container(
padding: EdgeInsets.only(left: 24, right: 24),
child: Text(
title,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
decoration: TextDecoration.none,
color: Colors.white
),
),
),
Padding(
padding: EdgeInsets.only(top: 24),
child: GestureDetector(
onTap: () => null,
child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(14)),
child: Container(
height: 400,
width: 300,
color: Theme.of(context).dividerColor,
child: GridView.count(
crossAxisCount: 3,
childAspectRatio: 1.25,
crossAxisSpacing: 1,
mainAxisSpacing: 1,
children: List.generate(items.length, (index) {
final item = items[index];
final isItemSelected = index == selectedAtIndex;
final color = isItemSelected
? Theme.of(context).accentTextTheme.subtitle.decorationColor
: Theme.of(context).primaryTextTheme.display1.color;
final textColor = isItemSelected
? Colors.blue
: Theme.of(context).primaryTextTheme.title.color;
return GestureDetector(
onTap: () {
if (onItemSelected == null) {
return;
}
Navigator.of(context).pop();
onItemSelected(item);
},
child: Container(
color: color,
child: Center(
child: Text(
item.toString(),
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
decoration: TextDecoration.none,
color: textColor
),
),
),
),
);
})
),
),
),
),
)
],
),
)
),
),
),
);
}
}

@ -38,103 +38,115 @@ class AddressTextField extends StatelessWidget {
@override
Widget build(BuildContext context) {
return TextFormField(
onFieldSubmitted: (_) => FocusScope.of(context).unfocus(),
enabled: isActive,
controller: controller,
focusNode: focusNode,
style: TextStyle(
fontSize: 16,
color: Theme.of(context).primaryTextTheme.title.color
),
decoration: InputDecoration(
suffixIcon: SizedBox(
width: prefixIconWidth * options.length +
(spaceBetweenPrefixIcons * options.length),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
SizedBox(width: 5),
if (this.options.contains(AddressTextFieldOption.qrCode)) ...[
Container(
width: prefixIconWidth,
height: prefixIconHeight,
padding: EdgeInsets.only(top: 0),
child: InkWell(
onTap: () async => _presentQRScanner(context),
child: Container(
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
color: buttonColor ?? Theme.of(context).accentTextTheme.title.color,
borderRadius:
BorderRadius.all(Radius.circular(6))),
child: Image.asset('assets/images/qr_code_icon.png')),
))
],
if (this
.options
.contains(AddressTextFieldOption.addressBook)) ...[
Container(
width: prefixIconWidth,
height: prefixIconHeight,
padding: EdgeInsets.only(top: 0),
child: InkWell(
onTap: () async => _presetAddressBookPicker(context),
child: Container(
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
color: buttonColor ?? Theme.of(context).accentTextTheme.title.color,
borderRadius:
BorderRadius.all(Radius.circular(6))),
child: Image.asset(
'assets/images/open_book.png')),
))
],
if (this
.options
.contains(AddressTextFieldOption.subaddressList)) ...[
Container(
width: prefixIconWidth,
height: prefixIconHeight,
padding: EdgeInsets.only(top: 0),
child: InkWell(
onTap: () async => _presetSubaddressListPicker(context),
child: Container(
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
color: buttonColor ?? Theme.of(context).accentTextTheme.title.color,
borderRadius:
BorderRadius.all(Radius.circular(6))),
child: Image.asset(
'assets/images/receive_icon_raw.png')),
))
],
],
return Stack(
children: <Widget>[
TextFormField(
onFieldSubmitted: (_) => FocusScope.of(context).unfocus(),
enabled: isActive,
controller: controller,
focusNode: focusNode,
style: TextStyle(
fontSize: 16,
color: Theme.of(context).primaryTextTheme.title.color
),
),
hintStyle: TextStyle(
fontSize: 16,
color: Theme.of(context).primaryTextTheme.caption.color
),
hintText: placeholder ?? S.current.widgets_address,
focusedBorder: isBorderExist
? UnderlineInputBorder(
borderSide: BorderSide(
color: Theme.of(context).dividerColor,
width: 1.0))
: InputBorder.none,
disabledBorder: isBorderExist
? UnderlineInputBorder(
borderSide:
BorderSide(color: Theme.of(context).dividerColor, width: 1.0))
: InputBorder.none,
enabledBorder: isBorderExist
? UnderlineInputBorder(
borderSide:
decoration: InputDecoration(
suffixIcon: SizedBox(
width: prefixIconWidth * options.length +
(spaceBetweenPrefixIcons * options.length),
),
hintStyle: TextStyle(
fontSize: 16,
color: Theme.of(context).primaryTextTheme.caption.color
),
hintText: placeholder ?? S.current.widgets_address,
focusedBorder: isBorderExist
? UnderlineInputBorder(
borderSide: BorderSide(
color: Theme.of(context).dividerColor,
width: 1.0))
: InputBorder.none,
disabledBorder: isBorderExist
? UnderlineInputBorder(
borderSide:
BorderSide(color: Theme.of(context).dividerColor, width: 1.0))
: InputBorder.none,
),
validator: validator,
: InputBorder.none,
enabledBorder: isBorderExist
? UnderlineInputBorder(
borderSide:
BorderSide(color: Theme.of(context).dividerColor, width: 1.0))
: InputBorder.none,
),
validator: validator,
),
Positioned(
bottom: 10,
right: 0,
child: SizedBox(
width: prefixIconWidth * options.length +
(spaceBetweenPrefixIcons * options.length),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
SizedBox(width: 5),
if (this.options.contains(AddressTextFieldOption.qrCode)) ...[
Container(
width: prefixIconWidth,
height: prefixIconHeight,
padding: EdgeInsets.only(top: 0),
child: InkWell(
onTap: () async => _presentQRScanner(context),
child: Container(
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
color: buttonColor ?? Theme.of(context).accentTextTheme.title.color,
borderRadius:
BorderRadius.all(Radius.circular(6))),
child: Image.asset('assets/images/qr_code_icon.png')),
))
],
if (this
.options
.contains(AddressTextFieldOption.addressBook)) ...[
Container(
width: prefixIconWidth,
height: prefixIconHeight,
padding: EdgeInsets.only(top: 0),
child: InkWell(
onTap: () async => _presetAddressBookPicker(context),
child: Container(
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
color: buttonColor ?? Theme.of(context).accentTextTheme.title.color,
borderRadius:
BorderRadius.all(Radius.circular(6))),
child: Image.asset(
'assets/images/open_book.png')),
))
],
if (this
.options
.contains(AddressTextFieldOption.subaddressList)) ...[
Container(
width: prefixIconWidth,
height: prefixIconHeight,
padding: EdgeInsets.only(top: 0),
child: InkWell(
onTap: () async => _presetSubaddressListPicker(context),
child: Container(
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
color: buttonColor ?? Theme.of(context).accentTextTheme.title.color,
borderRadius:
BorderRadius.all(Radius.circular(6))),
child: Image.asset(
'assets/images/receive_icon_raw.png')),
))
],
],
),
)
)
],
);
}

@ -0,0 +1,28 @@
import 'package:flutter/material.dart';
import 'package:cake_wallet/generated/i18n.dart';
class ClearButton extends StatelessWidget {
ClearButton({@required this.onPressed});
final VoidCallback onPressed;
@override
Widget build(BuildContext context) {
return ButtonTheme(
minWidth: double.minPositive,
highlightColor: Colors.transparent,
splashColor: Colors.transparent,
child: FlatButton(
padding: EdgeInsets.all(0),
child: Text(
S.of(context).clear,
style: TextStyle(
color: Theme.of(context).primaryTextTheme.caption.color,
fontWeight: FontWeight.w500,
fontSize: 14),
),
onPressed: onPressed),
);
}
}

@ -374,5 +374,8 @@
"openalias_alert_content" : "Sie senden Geld an\n${recipient_name}",
"card_address" : "Adresse:",
"buy" : "Kaufen"
"buy" : "Kaufen",
"placeholder_transactions" : "Ihre Transaktionen werden hier angezeigt",
"placeholder_contacts" : "Ihre Kontakte werden hier angezeigt"
}

@ -374,5 +374,8 @@
"openalias_alert_content" : "You will be sending funds to\n${recipient_name}",
"card_address" : "Address:",
"buy" : "Buy"
"buy" : "Buy",
"placeholder_transactions" : "Your transactions will be displayed here",
"placeholder_contacts" : "Your contacts will be displayed here"
}

@ -374,5 +374,8 @@
"openalias_alert_content" : "Enviará fondos a\n${recipient_name}",
"card_address" : "Dirección:",
"buy" : "Comprar"
"buy" : "Comprar",
"placeholder_transactions" : "Sus transacciones se mostrarán aquí",
"placeholder_contacts" : "Tus contactos se mostrarán aquí"
}

@ -374,5 +374,8 @@
"openalias_alert_content" : "आपको धनराशि भेजी जाएगी\n${recipient_name}",
"card_address" : "पता:",
"buy" : "खरीदें"
"buy" : "खरीदें",
"placeholder_transactions" : "आपके लेनदेन यहां प्रदर्शित होंगे",
"placeholder_contacts" : "आपके संपर्क यहां प्रदर्शित होंगे"
}

@ -374,5 +374,8 @@
"openalias_alert_content" : "に送金します\n${recipient_name}",
"card_address" : "住所:",
"buy" : "購入"
"buy" : "購入",
"placeholder_transactions" : "あなたの取引はここに表示されます",
"placeholder_contacts" : "連絡先はここに表示されます"
}

@ -374,5 +374,8 @@
"openalias_alert_content" : "당신은에 자금을 보낼 것입니다\n${recipient_name}",
"card_address" : "주소:",
"buy" : "구입"
"buy" : "구입",
"placeholder_transactions" : "거래가 여기에 표시됩니다",
"placeholder_contacts" : "연락처가 여기에 표시됩니다"
}

@ -374,5 +374,8 @@
"openalias_alert_content" : "U stuurt geld naar\n${recipient_name}",
"card_address" : "Adres:",
"buy" : "Kopen"
"buy" : "Kopen",
"placeholder_transactions" : "Uw transacties worden hier weergegeven",
"placeholder_contacts" : "Je contacten worden hier weergegeven"
}

@ -374,5 +374,8 @@
"openalias_alert_content" : "Będziesz wysyłać środki na\n${recipient_name}",
"card_address" : "Adres:",
"buy" : "Kup"
"buy" : "Kup",
"placeholder_transactions" : "Twoje transakcje zostaną wyświetlone tutaj",
"placeholder_contacts" : "Twoje kontakty zostaną wyświetlone tutaj"
}

@ -374,5 +374,8 @@
"openalias_alert_content" : "Você enviará fundos para\n${recipient_name}",
"card_address" : "Endereço:",
"buy" : "Comprar"
"buy" : "Comprar",
"placeholder_transactions" : "Suas transações serão exibidas aqui",
"placeholder_contacts" : "Seus contatos serão exibidos aqui"
}

@ -374,5 +374,8 @@
"openalias_alert_content" : "Вы будете отправлять средства\n${recipient_name}",
"card_address" : "Адрес:",
"buy" : "Купить"
"buy" : "Купить",
"placeholder_transactions" : "Ваши транзакции будут отображаться здесь",
"placeholder_contacts" : "Ваши контакты будут отображаться здесь"
}

@ -374,5 +374,8 @@
"openalias_alert_content" : "Ви будете відправляти кошти\n${recipient_name}",
"card_address" : "Адреса:",
"buy" : "Купити"
"buy" : "Купити",
"placeholder_transactions" : "Тут відображатимуться ваші транзакції",
"placeholder_contacts" : "Тут будуть показані ваші контакти"
}

@ -374,5 +374,8 @@
"openalias_alert_content" : "您將匯款至\n${recipient_name}",
"card_address" : "地址:",
"buy" : "購買"
"buy" : "購買",
"placeholder_transactions" : "您的交易將顯示在這裡",
"placeholder_contacts" : "您的聯繫人將顯示在這裡"
}
Loading…
Cancel
Save