59 lines
1.5 KiB
Dart
59 lines
1.5 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'flisp.dart';
|
|
|
|
// **************************************************************************
|
|
// TypeAdapterGenerator
|
|
// **************************************************************************
|
|
|
|
class FlispAdapter extends TypeAdapter<Flisp> {
|
|
@override
|
|
final int typeId = 1;
|
|
|
|
@override
|
|
Flisp read(BinaryReader reader) {
|
|
final numOfFields = reader.readByte();
|
|
final fields = <int, dynamic>{
|
|
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
|
};
|
|
return Flisp(
|
|
id: fields[0] as int?,
|
|
content: fields[1] as String,
|
|
imageUrl: fields[3] as String,
|
|
videoUrl: fields[4] as String,
|
|
createTime: fields[5] as DateTime?,
|
|
updateTime: fields[6] as DateTime?,
|
|
)..tagIndex = fields[2] as int;
|
|
}
|
|
|
|
@override
|
|
void write(BinaryWriter writer, Flisp obj) {
|
|
writer
|
|
..writeByte(7)
|
|
..writeByte(0)
|
|
..write(obj.id)
|
|
..writeByte(1)
|
|
..write(obj.content)
|
|
..writeByte(2)
|
|
..write(obj.tagIndex)
|
|
..writeByte(3)
|
|
..write(obj.imageUrl)
|
|
..writeByte(4)
|
|
..write(obj.videoUrl)
|
|
..writeByte(5)
|
|
..write(obj.createTime)
|
|
..writeByte(6)
|
|
..write(obj.updateTime);
|
|
}
|
|
|
|
@override
|
|
int get hashCode => typeId.hashCode;
|
|
|
|
@override
|
|
bool operator ==(Object other) =>
|
|
identical(this, other) ||
|
|
other is FlispAdapter &&
|
|
runtimeType == other.runtimeType &&
|
|
typeId == other.typeId;
|
|
}
|