Merge redesign part 3.

This commit is contained in:
M
2020-09-07 18:13:39 +03:00
parent 42ed4faf73
commit 70ff011fc6
13 changed files with 156 additions and 76 deletions
+5 -1
View File
@@ -1,11 +1,12 @@
import 'package:flutter/foundation.dart';
import 'package:hive/hive.dart';
import 'package:cake_wallet/src/domain/common/crypto_currency.dart';
import 'package:cake_wallet/utils/mobx.dart';
part 'contact.g.dart';
@HiveType(typeId: 0)
class Contact extends HiveObject {
class Contact extends HiveObject with Keyable {
Contact({@required this.name, @required this.address, CryptoCurrency type})
: raw = type?.raw;
@@ -22,6 +23,9 @@ class Contact extends HiveObject {
CryptoCurrency get type => CryptoCurrency.deserialize(raw: raw);
@override
dynamic get keyIndex => key;
@override
bool operator ==(Object o) => o is Contact && o.key == key;
+2 -1
View File
@@ -1,3 +1,4 @@
import 'package:cake_wallet/utils/mobx.dart';
import 'package:flutter/foundation.dart';
import 'dart:convert';
import 'package:http/http.dart' as http;
@@ -8,7 +9,7 @@ import 'package:cake_wallet/src/domain/common/digest_request.dart';
part 'node.g.dart';
@HiveType(typeId: 1)
class Node extends HiveObject {
class Node extends HiveObject with Keyable {
Node(
{@required this.uri,
@required WalletType type,
+1 -1
View File
@@ -108,7 +108,7 @@ class NodeListPage extends BasePage {
});
final dismissibleRow = Dismissible(
key: Key('${node.value.key}'),
key: Key('${node.keyIndex}'),
confirmDismiss: (direction) async {
return await showDialog(
context: context,