You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.7 KiB
60 lines
1.7 KiB
2 years ago
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||
|
|
||
|
part of 'ContentHive.dart';
|
||
|
|
||
|
// **************************************************************************
|
||
|
// TypeAdapterGenerator
|
||
|
// **************************************************************************
|
||
|
|
||
|
class ContentHiveAdapter extends TypeAdapter<ContentHive> {
|
||
|
@override
|
||
|
final int typeId = 0;
|
||
|
|
||
|
@override
|
||
|
ContentHive read(BinaryReader reader) {
|
||
|
final numOfFields = reader.readByte();
|
||
|
final fields = <int, dynamic>{
|
||
|
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
||
|
};
|
||
|
return ContentHive(
|
||
|
id: fields[0] as int,
|
||
|
content: fields[1] as String,
|
||
|
list: (fields[3] as List).cast<ContentListModel>(),
|
||
|
);
|
||
|
}
|
||
|
|
||
|
@override
|
||
|
void write(BinaryWriter writer, ContentHive obj) {
|
||
|
writer
|
||
|
..writeByte(3)
|
||
|
..writeByte(0)
|
||
|
..write(obj.id)
|
||
|
..writeByte(1)
|
||
|
..write(obj.content)
|
||
|
..writeByte(3)
|
||
|
..write(obj.list);
|
||
|
}
|
||
|
|
||
|
@override
|
||
|
int get hashCode => typeId.hashCode;
|
||
|
|
||
|
@override
|
||
|
bool operator ==(Object other) =>
|
||
|
identical(this, other) ||
|
||
|
other is ContentHiveAdapter &&
|
||
|
runtimeType == other.runtimeType &&
|
||
|
typeId == other.typeId;
|
||
|
}
|
||
|
|
||
|
// **************************************************************************
|
||
|
// JsonSerializableGenerator
|
||
|
// **************************************************************************
|
||
|
|
||
|
ContentHive _$ContentHiveFromJson(Map<String, dynamic> json) => ContentHive(
|
||
|
id: json['id'] as int,
|
||
|
content: json['content'] as String,
|
||
|
list: (json['list'] as List<dynamic>)
|
||
|
.map((e) => ContentListModel.fromJson(e as Map<String, dynamic>))
|
||
|
.toList(),
|
||
|
);
|