mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-10 12:54:38 +00:00
CWA-214 | applied new design to show keys page; moved standard list row to widgets directory
This commit is contained in:
parent
8769e93025
commit
ba9b19214c
4 changed files with 37 additions and 31 deletions
|
@ -7,10 +7,11 @@ import 'package:cake_wallet/palette.dart';
|
||||||
import 'package:cake_wallet/generated/i18n.dart';
|
import 'package:cake_wallet/generated/i18n.dart';
|
||||||
import 'package:cake_wallet/src/stores/wallet/wallet_keys_store.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/screens/base_page.dart';
|
||||||
|
import 'package:cake_wallet/src/widgets/standart_list_row.dart';
|
||||||
|
|
||||||
class ShowKeysPage extends BasePage {
|
class ShowKeysPage extends BasePage {
|
||||||
@override
|
@override
|
||||||
bool get isModalBackButton => true;
|
Color get backgroundColor => PaletteDark.historyPanel;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get title => S.current.wallet_keys;
|
String get title => S.current.wallet_keys;
|
||||||
|
@ -20,7 +21,8 @@ class ShowKeysPage extends BasePage {
|
||||||
final walletKeysStore = Provider.of<WalletKeysStore>(context);
|
final walletKeysStore = Provider.of<WalletKeysStore>(context);
|
||||||
|
|
||||||
return Container(
|
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(
|
child: Observer(
|
||||||
builder: (_) {
|
builder: (_) {
|
||||||
final keysMap = {
|
final keysMap = {
|
||||||
|
@ -31,39 +33,43 @@ class ShowKeysPage extends BasePage {
|
||||||
};
|
};
|
||||||
|
|
||||||
return ListView.separated(
|
return ListView.separated(
|
||||||
separatorBuilder: (_, __) => Container(
|
separatorBuilder: (context, index) => Container(
|
||||||
padding: EdgeInsets.only(left: 30.0, right: 20.0),
|
height: 1,
|
||||||
child: Divider(
|
padding: EdgeInsets.only(left: 24),
|
||||||
color: Theme.of(context).dividerTheme.color,
|
color: PaletteDark.menuList,
|
||||||
height: 1.0)),
|
child: Container(
|
||||||
|
height: 1,
|
||||||
|
color: PaletteDark.walletCardTopEndSync,
|
||||||
|
),
|
||||||
|
),
|
||||||
itemCount: keysMap.length,
|
itemCount: keysMap.length,
|
||||||
itemBuilder: (BuildContext context, int index) {
|
itemBuilder: (BuildContext context, int index) {
|
||||||
final key = keysMap.keys.elementAt(index);
|
final key = keysMap.keys.elementAt(index);
|
||||||
final value = keysMap.values.elementAt(index);
|
final value = keysMap.values.elementAt(index);
|
||||||
|
|
||||||
return ListTile(
|
final isDrawTop = index == 0 ? true : false;
|
||||||
contentPadding: EdgeInsets.only(
|
final isDrawBottom = index == keysMap.length - 1 ? true : false;
|
||||||
top: 10, bottom: 10, left: 30, right: 20),
|
|
||||||
onTap: () {
|
return GestureDetector(
|
||||||
Clipboard.setData(ClipboardData(
|
onTap: () {
|
||||||
text: keysMap.values.elementAt(index)));
|
Clipboard.setData(ClipboardData(text: value));
|
||||||
Scaffold.of(context).showSnackBar(SnackBar(
|
Scaffold.of(context).showSnackBar(SnackBar(
|
||||||
content: Text(
|
content: Text(
|
||||||
S.of(context).copied_key_to_clipboard(key),
|
S.of(context).copied_key_to_clipboard(key),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(color: Colors.white),
|
style: TextStyle(color: Colors.white),
|
||||||
),
|
),
|
||||||
backgroundColor: Colors.green,
|
backgroundColor: Colors.green,
|
||||||
duration: Duration(seconds: 1),
|
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)),
|
|
||||||
));
|
));
|
||||||
|
},
|
||||||
|
child: StandartListRow(
|
||||||
|
title: key + ':',
|
||||||
|
value: value,
|
||||||
|
isDrawTop: isDrawTop,
|
||||||
|
isDrawBottom: isDrawBottom,
|
||||||
|
),
|
||||||
|
);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
));
|
));
|
||||||
|
|
|
@ -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/stores/settings/settings_store.dart';
|
||||||
import 'package:cake_wallet/src/screens/base_page.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_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';
|
import 'package:cake_wallet/palette.dart';
|
||||||
|
|
||||||
class TradeDetailsPage extends BasePage {
|
class TradeDetailsPage extends BasePage {
|
||||||
|
|
|
@ -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/domain/common/transaction_info.dart';
|
||||||
import 'package:cake_wallet/src/stores/settings/settings_store.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_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/src/screens/base_page.dart';
|
||||||
import 'package:cake_wallet/palette.dart';
|
import 'package:cake_wallet/palette.dart';
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue