import 'dart:convert'; import 'package:azlistview/azlistview.dart'; import 'package:flutter/material.dart'; class CityModel extends ISuspensionBean { String? name; String? tagIndex; String? namePinyin; CityModel({ required this.name, this.tagIndex, this.namePinyin, }); CityModel.fromJson(Map json) : name = json['name']; Map toJson() => { 'name': name, // 'tagIndex': tagIndex, // 'namePinyin': namePinyin, // 'isShowSuspension': isShowSuspension }; @override String getSuspensionTag() => tagIndex!; @override String toString() => json.encode(this); } class ContactInfo extends ISuspensionBean { String? name; String? tagIndex; String? namePinyin; Color? bgColor; IconData? iconData; String? img; String? id; String? firstletter; ContactInfo({ required this.name, this.tagIndex, this.namePinyin, this.bgColor, this.iconData, this.img, this.id, this.firstletter, }); ContactInfo.fromJson(Map json) : name = json['name'], img = json['img'], id = json['id']?.toString(), firstletter = json['firstletter']; Map toJson() => { // 'id': id, 'name': name, 'img': img, // 'firstletter': firstletter, // 'tagIndex': tagIndex, // 'namePinyin': namePinyin, // 'isShowSuspension': isShowSuspension }; @override String getSuspensionTag() => tagIndex!; @override String toString() => json.encode(this); }