| 1 | // GENERATED CODE - DO NOT MODIFY BY HAND |
| 2 | |
| 3 | part of 'unspent_coins_info.dart'; |
| 4 | |
| 5 | // ************************************************************************** |
| 6 | // TypeAdapterGenerator |
| 7 | // ************************************************************************** |
| 8 | |
| 9 | class UnspentCoinsInfoAdapter extends TypeAdapter<UnspentCoinsInfo> { |
| 10 | @override |
| 11 | final int typeId = 9; |
| 12 | |
| 13 | @override |
| 14 | UnspentCoinsInfo read(BinaryReader reader) { |
| 15 | final numOfFields = reader.readByte(); |
| 16 | final fields = <int, dynamic>{ |
| 17 | for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(), |
| 18 | }; |
| 19 | return UnspentCoinsInfo( |
| 20 | walletId: fields[0] == null ? '' : fields[0] as String, |
| 21 | hash: fields[1] == null ? '' : fields[1] as String, |
| 22 | isFrozen: fields[2] == null ? false : fields[2] as bool, |
| 23 | isSending: fields[3] == null ? false : fields[3] as bool, |
| 24 | noteRaw: fields[4] as String?, |
| 25 | address: fields[5] == null ? '' : fields[5] as String, |
| 26 | vout: fields[7] == null ? 0 : fields[7] as int, |
| 27 | value: fields[6] == null ? 0 : fields[6] as int, |
| 28 | keyImage: fields[8] as String?, |
| 29 | isChange: fields[9] == null ? false : fields[9] as bool, |
| 30 | accountIndex: fields[10] == null ? 0 : fields[10] as int, |
| 31 | isSilentPayment: fields[11] == null ? false : fields[11] as bool?, |
| 32 | ); |
| 33 | } |
| 34 | |
| 35 | @override |
| 36 | void write(BinaryWriter writer, UnspentCoinsInfo obj) { |
| 37 | writer |
| 38 | ..writeByte(12) |
| 39 | ..writeByte(0) |
| 40 | ..write(obj.walletId) |
| 41 | ..writeByte(1) |
| 42 | ..write(obj.hash) |
| 43 | ..writeByte(2) |
| 44 | ..write(obj.isFrozen) |
| 45 | ..writeByte(3) |
| 46 | ..write(obj.isSending) |
| 47 | ..writeByte(4) |
| 48 | ..write(obj.noteRaw) |
| 49 | ..writeByte(5) |
| 50 | ..write(obj.address) |
| 51 | ..writeByte(6) |
| 52 | ..write(obj.value) |
| 53 | ..writeByte(7) |
| 54 | ..write(obj.vout) |
| 55 | ..writeByte(8) |
| 56 | ..write(obj.keyImage) |
| 57 | ..writeByte(9) |
| 58 | ..write(obj.isChange) |
| 59 | ..writeByte(10) |
| 60 | ..write(obj.accountIndex) |
| 61 | ..writeByte(11) |
| 62 | ..write(obj.isSilentPayment); |
| 63 | } |
| 64 | |
| 65 | @override |
| 66 | int get hashCode => typeId.hashCode; |
| 67 | |
| 68 | @override |
| 69 | bool operator ==(Object other) => |
| 70 | identical(this, other) || |
| 71 | other is UnspentCoinsInfoAdapter && |
| 72 | runtimeType == other.runtimeType && |
| 73 | typeId == other.typeId; |
| 74 | } |