mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-23 12:09:43 +00:00
save
This commit is contained in:
parent
f948b3dea6
commit
788c66bcf3
2 changed files with 7 additions and 56 deletions
|
@ -1,46 +0,0 @@
|
|||
// import 'package:flutter/services.dart';
|
||||
// import 'package:hive/hive.dart';
|
||||
// import "package:yaml/yaml.dart";
|
||||
// import 'package:cw_core/node.dart';
|
||||
// import 'package:cw_core/wallet_type.dart';
|
||||
|
||||
// Future<List<Node>> loadDefaultNanoPowNodes() async {
|
||||
// final nodesRaw = await rootBundle.loadString('assets/nano_pow_node_list.yml');
|
||||
// final loadedNodes = loadYaml(nodesRaw) as YamlList;
|
||||
// final nodes = <Node>[];
|
||||
|
||||
// for (final raw in loadedNodes) {
|
||||
// if (raw is Map) {
|
||||
// final node = Node.fromMap(Map<String, Object>.from(raw));
|
||||
// node.type = WalletType.nano;
|
||||
// nodes.add(node);
|
||||
// }
|
||||
// }
|
||||
|
||||
// return nodes;
|
||||
// }
|
||||
|
||||
// Future<List<Node>> loadDefaultBananoPowNodes() async {
|
||||
// final nodesRaw = await rootBundle.loadString('assets/nano_pow_node_list.yml');
|
||||
// final loadedNodes = loadYaml(nodesRaw) as YamlList;
|
||||
// final nodes = <Node>[];
|
||||
|
||||
// for (final raw in loadedNodes) {
|
||||
// if (raw is Map) {
|
||||
// final node = Node.fromMap(Map<String, Object>.from(raw));
|
||||
// node.type = WalletType.banano;
|
||||
// nodes.add(node);
|
||||
// }
|
||||
// }
|
||||
|
||||
// return nodes;
|
||||
// }
|
||||
|
||||
// Future resetToDefault(Box<Node> nodeSource) async {
|
||||
// final nanoNodes = await loadDefaultNanoPowNodes();
|
||||
// final bananoNodes = await loadDefaultNanoPowNodes();
|
||||
// final nodes = nanoNodes + bananoNodes;
|
||||
|
||||
// await nodeSource.clear();
|
||||
// await nodeSource.addAll(nodes);
|
||||
// }
|
|
@ -1,6 +1,7 @@
|
|||
import 'package:cake_wallet/routes.dart';
|
||||
import 'package:cake_wallet/src/screens/nodes/widgets/node_indicator.dart';
|
||||
import 'package:cake_wallet/src/widgets/standard_list.dart';
|
||||
import 'package:cake_wallet/themes/extensions/receive_page_theme.dart';
|
||||
import 'package:cw_core/pow_node.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
|
@ -31,19 +32,15 @@ class PowNodeListRow extends StandardListRow {
|
|||
@override
|
||||
Widget buildTrailing(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onTap: () => Navigator.of(context).pushNamed(Routes.newPowNode,
|
||||
arguments: {'editingNode': node, 'isSelected': isSelected}),
|
||||
onTap: () => Navigator.of(context)
|
||||
.pushNamed(Routes.newNode, arguments: {'editingNode': node, 'isSelected': isSelected}),
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(10),
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Theme.of(context)
|
||||
.textTheme
|
||||
.headlineMedium!
|
||||
.decorationColor!),
|
||||
color: Theme.of(context).extension<ReceivePageTheme>()!.iconsBackgroundColor),
|
||||
child: Icon(Icons.edit,
|
||||
size: 14,
|
||||
color: Theme.of(context).textTheme.headlineMedium!.color!)));
|
||||
size: 14, color: Theme.of(context).extension<ReceivePageTheme>()!.iconsColor)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -55,8 +52,8 @@ class PowNodeHeaderListRow extends StandardListRow {
|
|||
Widget buildTrailing(BuildContext context) {
|
||||
return SizedBox(
|
||||
width: 20,
|
||||
child: Icon(Icons.add,
|
||||
color: Theme.of(context).accentTextTheme!.titleMedium!.color,size: 24.0),
|
||||
child:
|
||||
Icon(Icons.add, color: Theme.of(context).accentTextTheme!.titleMedium!.color, size: 24.0),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue