mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-26 06:08:40 +01:00
Upgrade Flutter version to 3.41.9 (#3213)
* commit generated files and remove codegen metadata * remove hive_generator dependency * update dependencies * update intl * update ios project files * update native code * update android deps * update image name in ci * revert impeller * re-ignore min version error * fix cw_decred dependency * update hive in cw_core * fix docker build cache for decred * fix conflict * prevent frozen coins being reset on coin info refresh * fix for makeSecure --------- Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
@@ -3,9 +3,9 @@ import 'package:cw_core/hive_type_ids.dart';
|
||||
import 'package:cw_core/keyable.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
|
||||
part 'contact.g.dart';
|
||||
part 'contact.part.dart';
|
||||
|
||||
@HiveType(typeId: Contact.typeId)
|
||||
// @HiveType(typeId: Contact.typeId)
|
||||
class Contact extends HiveObject with Keyable {
|
||||
Contact({required this.name, required this.address, CryptoCurrency? type, DateTime? lastChange, this.displayName = ""})
|
||||
: lastChange = lastChange ?? DateTime.now() {
|
||||
@@ -17,19 +17,19 @@ class Contact extends HiveObject with Keyable {
|
||||
static const typeId = CONTACT_TYPE_ID;
|
||||
static const boxName = 'Contacts';
|
||||
|
||||
@HiveField(0, defaultValue: '')
|
||||
// @HiveField(0, defaultValue: '')
|
||||
String name;
|
||||
|
||||
@HiveField(1, defaultValue: '')
|
||||
// @HiveField(1, defaultValue: '')
|
||||
String address;
|
||||
|
||||
@HiveField(2, defaultValue: 0)
|
||||
// @HiveField(2, defaultValue: 0)
|
||||
late int raw;
|
||||
|
||||
@HiveField(3)
|
||||
// @HiveField(3)
|
||||
DateTime lastChange;
|
||||
|
||||
@HiveField(4, defaultValue: "")
|
||||
// @HiveField(4, defaultValue: "")
|
||||
String displayName;
|
||||
|
||||
CryptoCurrency get type => CryptoCurrency.deserialize(raw: raw);
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'contact.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// TypeAdapterGenerator
|
||||
// **************************************************************************
|
||||
|
||||
class ContactAdapter extends TypeAdapter<Contact> {
|
||||
@override
|
||||
final int typeId = 0;
|
||||
|
||||
@override
|
||||
Contact read(BinaryReader reader) {
|
||||
final numOfFields = reader.readByte();
|
||||
final fields = <int, dynamic>{
|
||||
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
||||
};
|
||||
return Contact(
|
||||
name: fields[0] == null ? '' : fields[0] as String,
|
||||
address: fields[1] == null ? '' : fields[1] as String,
|
||||
lastChange: fields[3] as DateTime?,
|
||||
displayName: fields[4] == null ? '' : fields[4] as String,
|
||||
)..raw = fields[2] == null ? 0 : fields[2] as int;
|
||||
}
|
||||
|
||||
@override
|
||||
void write(BinaryWriter writer, Contact obj) {
|
||||
writer
|
||||
..writeByte(5)
|
||||
..writeByte(0)
|
||||
..write(obj.name)
|
||||
..writeByte(1)
|
||||
..write(obj.address)
|
||||
..writeByte(2)
|
||||
..write(obj.raw)
|
||||
..writeByte(3)
|
||||
..write(obj.lastChange)
|
||||
..writeByte(4)
|
||||
..write(obj.displayName);
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => typeId.hashCode;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is ContactAdapter &&
|
||||
runtimeType == other.runtimeType &&
|
||||
typeId == other.typeId;
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
import 'package:cw_core/hive_type_ids.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
|
||||
part 'haven_seed_store.g.dart';
|
||||
part 'haven_seed_store.part.dart';
|
||||
|
||||
@HiveType(typeId: HavenSeedStore.typeId)
|
||||
// @HiveType(typeId: HavenSeedStore.typeId)
|
||||
class HavenSeedStore extends HiveObject {
|
||||
HavenSeedStore({required this.id, this.seed});
|
||||
|
||||
@@ -11,9 +11,9 @@ class HavenSeedStore extends HiveObject {
|
||||
static const boxName = 'HavenSeedStore';
|
||||
static const boxKey = 'havenSeedStoreKey';
|
||||
|
||||
@HiveField(0, defaultValue: '')
|
||||
// @HiveField(0, defaultValue: '')
|
||||
String id;
|
||||
|
||||
@HiveField(2)
|
||||
// @HiveField(2)
|
||||
String? seed;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'haven_seed_store.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// TypeAdapterGenerator
|
||||
// **************************************************************************
|
||||
|
||||
class HavenSeedStoreAdapter extends TypeAdapter<HavenSeedStore> {
|
||||
@override
|
||||
final int typeId = 21;
|
||||
|
||||
@override
|
||||
HavenSeedStore read(BinaryReader reader) {
|
||||
final numOfFields = reader.readByte();
|
||||
final fields = <int, dynamic>{
|
||||
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
||||
};
|
||||
return HavenSeedStore(
|
||||
id: fields[0] == null ? '' : fields[0] as String,
|
||||
seed: fields[2] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void write(BinaryWriter writer, HavenSeedStore obj) {
|
||||
writer
|
||||
..writeByte(2)
|
||||
..writeByte(0)
|
||||
..write(obj.id)
|
||||
..writeByte(2)
|
||||
..write(obj.seed);
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => typeId.hashCode;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is HavenSeedStoreAdapter &&
|
||||
runtimeType == other.runtimeType &&
|
||||
typeId == other.typeId;
|
||||
}
|
||||
+10
-10
@@ -1,9 +1,9 @@
|
||||
import 'package:cw_core/hive_type_ids.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
|
||||
part 'template.g.dart';
|
||||
part 'template.part.dart';
|
||||
|
||||
@HiveType(typeId: Template.typeId)
|
||||
// @HiveType(typeId: Template.typeId)
|
||||
class Template extends HiveObject {
|
||||
Template(
|
||||
{required this.nameRaw,
|
||||
@@ -18,28 +18,28 @@ class Template extends HiveObject {
|
||||
static const typeId = TEMPLATE_TYPE_ID;
|
||||
static const boxName = 'Template';
|
||||
|
||||
@HiveField(0)
|
||||
// @HiveField(0)
|
||||
String? nameRaw;
|
||||
|
||||
@HiveField(1)
|
||||
// @HiveField(1)
|
||||
String? addressRaw;
|
||||
|
||||
@HiveField(2)
|
||||
// @HiveField(2)
|
||||
String? cryptoCurrencyRaw;
|
||||
|
||||
@HiveField(3)
|
||||
// @HiveField(3)
|
||||
String? amountRaw;
|
||||
|
||||
@HiveField(4)
|
||||
// @HiveField(4)
|
||||
String? fiatCurrencyRaw;
|
||||
|
||||
@HiveField(5)
|
||||
// @HiveField(5)
|
||||
bool? isCurrencySelectedRaw;
|
||||
|
||||
@HiveField(6)
|
||||
// @HiveField(6)
|
||||
String? amountFiatRaw;
|
||||
|
||||
@HiveField(7)
|
||||
// @HiveField(7)
|
||||
List<Template>? additionalRecipientsRaw;
|
||||
|
||||
bool get isCurrencySelected => isCurrencySelectedRaw ?? false;
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'template.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// TypeAdapterGenerator
|
||||
// **************************************************************************
|
||||
|
||||
class TemplateAdapter extends TypeAdapter<Template> {
|
||||
@override
|
||||
final int typeId = 6;
|
||||
|
||||
@override
|
||||
Template read(BinaryReader reader) {
|
||||
final numOfFields = reader.readByte();
|
||||
final fields = <int, dynamic>{
|
||||
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
||||
};
|
||||
return Template(
|
||||
nameRaw: fields[0] as String?,
|
||||
isCurrencySelectedRaw: fields[5] as bool?,
|
||||
addressRaw: fields[1] as String?,
|
||||
cryptoCurrencyRaw: fields[2] as String?,
|
||||
amountRaw: fields[3] as String?,
|
||||
fiatCurrencyRaw: fields[4] as String?,
|
||||
amountFiatRaw: fields[6] as String?,
|
||||
additionalRecipientsRaw: (fields[7] as List?)?.cast<Template>(),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void write(BinaryWriter writer, Template obj) {
|
||||
writer
|
||||
..writeByte(8)
|
||||
..writeByte(0)
|
||||
..write(obj.nameRaw)
|
||||
..writeByte(1)
|
||||
..write(obj.addressRaw)
|
||||
..writeByte(2)
|
||||
..write(obj.cryptoCurrencyRaw)
|
||||
..writeByte(3)
|
||||
..write(obj.amountRaw)
|
||||
..writeByte(4)
|
||||
..write(obj.fiatCurrencyRaw)
|
||||
..writeByte(5)
|
||||
..write(obj.isCurrencySelectedRaw)
|
||||
..writeByte(6)
|
||||
..write(obj.amountFiatRaw)
|
||||
..writeByte(7)
|
||||
..write(obj.additionalRecipientsRaw);
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => typeId.hashCode;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is TemplateAdapter &&
|
||||
runtimeType == other.runtimeType &&
|
||||
typeId == other.typeId;
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
import 'package:cw_core/hive_type_ids.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
|
||||
part 'transaction_description.g.dart';
|
||||
part 'transaction_description.part.dart';
|
||||
|
||||
@HiveType(typeId: TransactionDescription.typeId)
|
||||
// @HiveType(typeId: TransactionDescription.typeId)
|
||||
class TransactionDescription extends HiveObject {
|
||||
TransactionDescription({required this.id, this.recipientAddress, this.transactionNote, this.transactionKey});
|
||||
|
||||
@@ -11,16 +11,16 @@ class TransactionDescription extends HiveObject {
|
||||
static const boxName = 'TransactionDescriptions';
|
||||
static const boxKey = 'transactionDescriptionsBoxKey';
|
||||
|
||||
@HiveField(0, defaultValue: '')
|
||||
// @HiveField(0, defaultValue: '')
|
||||
String id;
|
||||
|
||||
@HiveField(1)
|
||||
// @HiveField(1)
|
||||
String? recipientAddress;
|
||||
|
||||
@HiveField(2)
|
||||
// @HiveField(2)
|
||||
String? transactionNote;
|
||||
|
||||
@HiveField(3)
|
||||
// @HiveField(3)
|
||||
String? transactionKey;
|
||||
|
||||
String get note => transactionNote ?? '';
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'transaction_description.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// TypeAdapterGenerator
|
||||
// **************************************************************************
|
||||
|
||||
class TransactionDescriptionAdapter
|
||||
extends TypeAdapter<TransactionDescription> {
|
||||
@override
|
||||
final int typeId = 2;
|
||||
|
||||
@override
|
||||
TransactionDescription read(BinaryReader reader) {
|
||||
final numOfFields = reader.readByte();
|
||||
final fields = <int, dynamic>{
|
||||
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
||||
};
|
||||
return TransactionDescription(
|
||||
id: fields[0] == null ? '' : fields[0] as String,
|
||||
recipientAddress: fields[1] as String?,
|
||||
transactionNote: fields[2] as String?,
|
||||
transactionKey: fields[3] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void write(BinaryWriter writer, TransactionDescription obj) {
|
||||
writer
|
||||
..writeByte(4)
|
||||
..writeByte(0)
|
||||
..write(obj.id)
|
||||
..writeByte(1)
|
||||
..write(obj.recipientAddress)
|
||||
..writeByte(2)
|
||||
..write(obj.transactionNote)
|
||||
..writeByte(3)
|
||||
..write(obj.transactionKey);
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => typeId.hashCode;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is TransactionDescriptionAdapter &&
|
||||
runtimeType == other.runtimeType &&
|
||||
typeId == other.typeId;
|
||||
}
|
||||
Reference in New Issue
Block a user