mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-03-26 00:58:44 +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/routes.dart';
|
||||||
import 'package:cake_wallet/src/screens/nodes/widgets/node_indicator.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/src/widgets/standard_list.dart';
|
||||||
|
import 'package:cake_wallet/themes/extensions/receive_page_theme.dart';
|
||||||
import 'package:cw_core/pow_node.dart';
|
import 'package:cw_core/pow_node.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
@ -31,19 +32,15 @@ class PowNodeListRow extends StandardListRow {
|
||||||
@override
|
@override
|
||||||
Widget buildTrailing(BuildContext context) {
|
Widget buildTrailing(BuildContext context) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () => Navigator.of(context).pushNamed(Routes.newPowNode,
|
onTap: () => Navigator.of(context)
|
||||||
arguments: {'editingNode': node, 'isSelected': isSelected}),
|
.pushNamed(Routes.newNode, arguments: {'editingNode': node, 'isSelected': isSelected}),
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.all(10),
|
padding: EdgeInsets.all(10),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
color: Theme.of(context)
|
color: Theme.of(context).extension<ReceivePageTheme>()!.iconsBackgroundColor),
|
||||||
.textTheme
|
|
||||||
.headlineMedium!
|
|
||||||
.decorationColor!),
|
|
||||||
child: Icon(Icons.edit,
|
child: Icon(Icons.edit,
|
||||||
size: 14,
|
size: 14, color: Theme.of(context).extension<ReceivePageTheme>()!.iconsColor)));
|
||||||
color: Theme.of(context).textTheme.headlineMedium!.color!)));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,8 +52,8 @@ class PowNodeHeaderListRow extends StandardListRow {
|
||||||
Widget buildTrailing(BuildContext context) {
|
Widget buildTrailing(BuildContext context) {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
width: 20,
|
width: 20,
|
||||||
child: Icon(Icons.add,
|
child:
|
||||||
color: Theme.of(context).accentTextTheme!.titleMedium!.color,size: 24.0),
|
Icon(Icons.add, color: Theme.of(context).accentTextTheme!.titleMedium!.color, size: 24.0),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue