toMap method
Implementation
Map<String, dynamic> toMap() {
return {
'id': id,
'slug': slug,
'name': name,
'code': code,
'stateId': stateId,
'state': state?.toMap(),
'City': cities.map((city) => city.toMap()).toList(),
};
}