|
|
|
@ -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<WalletKeysStore>(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,22 +33,26 @@ 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),
|
|
|
|
|
final isDrawTop = index == 0 ? true : false;
|
|
|
|
|
final isDrawBottom = index == keysMap.length - 1 ? true : false;
|
|
|
|
|
|
|
|
|
|
return GestureDetector(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Clipboard.setData(ClipboardData(
|
|
|
|
|
text: keysMap.values.elementAt(index)));
|
|
|
|
|
Clipboard.setData(ClipboardData(text: value));
|
|
|
|
|
Scaffold.of(context).showSnackBar(SnackBar(
|
|
|
|
|
content: Text(
|
|
|
|
|
S.of(context).copied_key_to_clipboard(key),
|
|
|
|
@ -57,13 +63,13 @@ class ShowKeysPage extends BasePage {
|
|
|
|
|
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,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
));
|
|
|
|
|