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.
80 lines
1.6 KiB
80 lines
1.6 KiB
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<String, dynamic> json) : name = json['name'];
|
|
|
|
Map<String, dynamic> 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<String, dynamic> json)
|
|
: name = json['name'],
|
|
img = json['img'],
|
|
id = json['id']?.toString(),
|
|
firstletter = json['firstletter'];
|
|
|
|
Map<String, dynamic> 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);
|
|
}
|
|
|