From 788c66bcf3f33a2bcb338b1b9422037722ff3349 Mon Sep 17 00:00:00 2001 From: fosse Date: Fri, 18 Aug 2023 09:19:58 -0400 Subject: [PATCH] save --- lib/entities/pow_node_list.dart | 46 ------------------- .../nodes/widgets/pow_node_list_row.dart | 17 +++---- 2 files changed, 7 insertions(+), 56 deletions(-) delete mode 100644 lib/entities/pow_node_list.dart diff --git a/lib/entities/pow_node_list.dart b/lib/entities/pow_node_list.dart deleted file mode 100644 index 2336117f1..000000000 --- a/lib/entities/pow_node_list.dart +++ /dev/null @@ -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> loadDefaultNanoPowNodes() async { -// final nodesRaw = await rootBundle.loadString('assets/nano_pow_node_list.yml'); -// final loadedNodes = loadYaml(nodesRaw) as YamlList; -// final nodes = []; - -// for (final raw in loadedNodes) { -// if (raw is Map) { -// final node = Node.fromMap(Map.from(raw)); -// node.type = WalletType.nano; -// nodes.add(node); -// } -// } - -// return nodes; -// } - -// Future> loadDefaultBananoPowNodes() async { -// final nodesRaw = await rootBundle.loadString('assets/nano_pow_node_list.yml'); -// final loadedNodes = loadYaml(nodesRaw) as YamlList; -// final nodes = []; - -// for (final raw in loadedNodes) { -// if (raw is Map) { -// final node = Node.fromMap(Map.from(raw)); -// node.type = WalletType.banano; -// nodes.add(node); -// } -// } - -// return nodes; -// } - -// Future resetToDefault(Box nodeSource) async { -// final nanoNodes = await loadDefaultNanoPowNodes(); -// final bananoNodes = await loadDefaultNanoPowNodes(); -// final nodes = nanoNodes + bananoNodes; - -// await nodeSource.clear(); -// await nodeSource.addAll(nodes); -// } diff --git a/lib/src/screens/nodes/widgets/pow_node_list_row.dart b/lib/src/screens/nodes/widgets/pow_node_list_row.dart index 71924e332..2a829650d 100644 --- a/lib/src/screens/nodes/widgets/pow_node_list_row.dart +++ b/lib/src/screens/nodes/widgets/pow_node_list_row.dart @@ -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()!.iconsBackgroundColor), child: Icon(Icons.edit, - size: 14, - color: Theme.of(context).textTheme.headlineMedium!.color!))); + size: 14, color: Theme.of(context).extension()!.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), ); } }