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.
aku_new_community/lib/model/user/province_model.g.dart

125 lines
2.9 KiB

// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'province_model.dart';
// **************************************************************************
// TypeAdapterGenerator
// **************************************************************************
class ProvinceModelAdapter extends TypeAdapter<ProvinceModel> {
@override
final int typeId = 0;
@override
ProvinceModel read(BinaryReader reader) {
final numOfFields = reader.readByte();
final fields = <int, dynamic>{
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
};
return ProvinceModel(
id: fields[0] as int?,
name: fields[1] as String?,
cityList: (fields[2] as List?)?.cast<City>(),
);
}
@override
void write(BinaryWriter writer, ProvinceModel obj) {
writer
..writeByte(3)
..writeByte(0)
..write(obj.id)
..writeByte(1)
..write(obj.name)
..writeByte(2)
..write(obj.cityList);
}
@override
int get hashCode => typeId.hashCode;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is ProvinceModelAdapter &&
runtimeType == other.runtimeType &&
typeId == other.typeId;
}
class CityAdapter extends TypeAdapter<City> {
@override
final int typeId = 1;
@override
City read(BinaryReader reader) {
final numOfFields = reader.readByte();
final fields = <int, dynamic>{
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
};
return City(
id: fields[0] as int?,
name: fields[1] as String?,
districts: (fields[2] as List?)?.cast<District>(),
);
}
@override
void write(BinaryWriter writer, City obj) {
writer
..writeByte(3)
..writeByte(0)
..write(obj.id)
..writeByte(1)
..write(obj.name)
..writeByte(2)
..write(obj.districts);
}
@override
int get hashCode => typeId.hashCode;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is CityAdapter &&
runtimeType == other.runtimeType &&
typeId == other.typeId;
}
class DistrictAdapter extends TypeAdapter<District> {
@override
final int typeId = 2;
@override
District read(BinaryReader reader) {
final numOfFields = reader.readByte();
final fields = <int, dynamic>{
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
};
return District(
id: fields[0] as int?,
name: fields[1] as String?,
);
}
@override
void write(BinaryWriter writer, District obj) {
writer
..writeByte(2)
..writeByte(0)
..write(obj.id)
..writeByte(1)
..write(obj.name);
}
@override
int get hashCode => typeId.hashCode;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is DistrictAdapter &&
runtimeType == other.runtimeType &&
typeId == other.typeId;
}