| 1 | // GENERATED CODE - DO NOT MODIFY BY HAND |
| 2 | |
| 3 | part of 'transaction_description.dart'; |
| 4 | |
| 5 | // ************************************************************************** |
| 6 | // TypeAdapterGenerator |
| 7 | // ************************************************************************** |
| 8 | |
| 9 | class TransactionDescriptionAdapter extends TypeAdapter<TransactionDescription> { |
| 10 | @override |
| 11 | final int typeId = 2; |
| 12 | |
| 13 | @override |
| 14 | TransactionDescription 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 TransactionDescription( |
| 20 | id: fields[0] == null ? '' : fields[0] as String, |
| 21 | recipientAddress: fields[1] as String?, |
| 22 | transactionNote: fields[2] as String?, |
| 23 | transactionKey: fields[3] as String?, |
| 24 | ); |
| 25 | } |
| 26 | |
| 27 | @override |
| 28 | void write(BinaryWriter writer, TransactionDescription obj) { |
| 29 | writer |
| 30 | ..writeByte(4) |
| 31 | ..writeByte(0) |
| 32 | ..write(obj.id) |
| 33 | ..writeByte(1) |
| 34 | ..write(obj.recipientAddress) |
| 35 | ..writeByte(2) |
| 36 | ..write(obj.transactionNote) |
| 37 | ..writeByte(3) |
| 38 | ..write(obj.transactionKey); |
| 39 | } |
| 40 | |
| 41 | @override |
| 42 | int get hashCode => typeId.hashCode; |
| 43 | |
| 44 | @override |
| 45 | bool operator ==(Object other) => |
| 46 | identical(this, other) || |
| 47 | other is TransactionDescriptionAdapter && |
| 48 | runtimeType == other.runtimeType && |
| 49 | typeId == other.typeId; |
| 50 | } |