CWA-202 | applied new design to nodes_list_page and new_node_page; created node_list_row widget, alert_with_one_action and alert_with_two_action; deleted reconnect_alert_dialog, wallet_creation_dialog, restore_alert_dialog and pin_alert_dialog

This commit is contained in:
Oleksandr Sobol
2020-05-04 23:12:36 +03:00
parent 262e6ca156
commit 8f54e53918
29 changed files with 549 additions and 539 deletions
@@ -12,6 +12,7 @@ class NodeListStore = NodeListBase with _$NodeListStore;
abstract class NodeListBase with Store {
NodeListBase({this.nodesSource}) {
nodes = ObservableList<Node>();
disabledState = true;
_onNodesChangeSubscription = nodesSource.watch().listen((e) => update());
update();
}
@@ -25,6 +26,9 @@ abstract class NodeListBase with Store {
@observable
String errorMessage;
@observable
bool disabledState;
Box<Node> nodesSource;
StreamSubscription<BoxEvent> _onNodesChangeSubscription;
@@ -61,6 +65,11 @@ abstract class NodeListBase with Store {
@action
Future reset() async => await resetToDefault(nodesSource);
@action
void setDisabledState(bool isDisable) {
disabledState = isDisable;
}
Future<bool> isNodeOnline(Node node) async {
try {
return await node.requestNode(node.uri,