diff --git a/lib/src/screens/show_keys/show_keys_page.dart b/lib/src/screens/show_keys/show_keys_page.dart index 445873e49..e1bb745f8 100644 --- a/lib/src/screens/show_keys/show_keys_page.dart +++ b/lib/src/screens/show_keys/show_keys_page.dart @@ -7,10 +7,11 @@ import 'package:cake_wallet/palette.dart'; import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/src/stores/wallet/wallet_keys_store.dart'; import 'package:cake_wallet/src/screens/base_page.dart'; +import 'package:cake_wallet/src/widgets/standart_list_row.dart'; class ShowKeysPage extends BasePage { @override - bool get isModalBackButton => true; + Color get backgroundColor => PaletteDark.historyPanel; @override String get title => S.current.wallet_keys; @@ -20,7 +21,8 @@ class ShowKeysPage extends BasePage { final walletKeysStore = Provider.of(context); return Container( - padding: EdgeInsets.only(top: 20.0, bottom: 20.0, left: 20, right: 20), + color: PaletteDark.historyPanel, + padding: EdgeInsets.only(top: 20.0, bottom: 20.0), child: Observer( builder: (_) { final keysMap = { @@ -31,39 +33,43 @@ class ShowKeysPage extends BasePage { }; return ListView.separated( - separatorBuilder: (_, __) => Container( - padding: EdgeInsets.only(left: 30.0, right: 20.0), - child: Divider( - color: Theme.of(context).dividerTheme.color, - height: 1.0)), + separatorBuilder: (context, index) => Container( + height: 1, + padding: EdgeInsets.only(left: 24), + color: PaletteDark.menuList, + child: Container( + height: 1, + color: PaletteDark.walletCardTopEndSync, + ), + ), itemCount: keysMap.length, itemBuilder: (BuildContext context, int index) { final key = keysMap.keys.elementAt(index); final value = keysMap.values.elementAt(index); - return ListTile( - contentPadding: EdgeInsets.only( - top: 10, bottom: 10, left: 30, right: 20), - onTap: () { - Clipboard.setData(ClipboardData( - text: keysMap.values.elementAt(index))); - Scaffold.of(context).showSnackBar(SnackBar( - content: Text( - S.of(context).copied_key_to_clipboard(key), - textAlign: TextAlign.center, - style: TextStyle(color: Colors.white), - ), - backgroundColor: Colors.green, - duration: Duration(seconds: 1), - )); - }, - title: Text(key + ':', style: TextStyle(fontSize: 16.0)), - subtitle: Container( - padding: EdgeInsets.only(top: 5.0), - child: Text(value, - style: TextStyle( - fontSize: 16.0, color: Palette.wildDarkBlue)), + final isDrawTop = index == 0 ? true : false; + final isDrawBottom = index == keysMap.length - 1 ? true : false; + + return GestureDetector( + onTap: () { + Clipboard.setData(ClipboardData(text: value)); + Scaffold.of(context).showSnackBar(SnackBar( + content: Text( + S.of(context).copied_key_to_clipboard(key), + textAlign: TextAlign.center, + style: TextStyle(color: Colors.white), + ), + backgroundColor: Colors.green, + duration: Duration(seconds: 1), )); + }, + child: StandartListRow( + title: key + ':', + value: value, + isDrawTop: isDrawTop, + isDrawBottom: isDrawBottom, + ), + ); }); }, )); diff --git a/lib/src/screens/trade_details/trade_details_page.dart b/lib/src/screens/trade_details/trade_details_page.dart index bdca38375..f5ceea3ef 100644 --- a/lib/src/screens/trade_details/trade_details_page.dart +++ b/lib/src/screens/trade_details/trade_details_page.dart @@ -8,7 +8,7 @@ import 'package:cake_wallet/src/stores/exchange_trade/exchange_trade_store.dart' import 'package:cake_wallet/src/stores/settings/settings_store.dart'; import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/src/screens/transaction_details/standart_list_item.dart'; -import 'package:cake_wallet/src/screens/transaction_details/standart_list_row.dart'; +import 'package:cake_wallet/src/widgets/standart_list_row.dart'; import 'package:cake_wallet/palette.dart'; class TradeDetailsPage extends BasePage { diff --git a/lib/src/screens/transaction_details/transaction_details_page.dart b/lib/src/screens/transaction_details/transaction_details_page.dart index 96fb2e37b..1686f5928 100644 --- a/lib/src/screens/transaction_details/transaction_details_page.dart +++ b/lib/src/screens/transaction_details/transaction_details_page.dart @@ -6,7 +6,7 @@ import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/src/domain/common/transaction_info.dart'; import 'package:cake_wallet/src/stores/settings/settings_store.dart'; import 'package:cake_wallet/src/screens/transaction_details/standart_list_item.dart'; -import 'package:cake_wallet/src/screens/transaction_details/standart_list_row.dart'; +import 'package:cake_wallet/src/widgets/standart_list_row.dart'; import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/palette.dart'; diff --git a/lib/src/screens/transaction_details/standart_list_row.dart b/lib/src/widgets/standart_list_row.dart similarity index 100% rename from lib/src/screens/transaction_details/standart_list_row.dart rename to lib/src/widgets/standart_list_row.dart