|
|
|
@ -2,7 +2,7 @@ import 'package:common_utils/common_utils.dart';
|
|
|
|
|
|
|
|
|
|
class UserInfoModel {
|
|
|
|
|
int id;
|
|
|
|
|
List<String> imgUrls;
|
|
|
|
|
String imgUrl;
|
|
|
|
|
String name;
|
|
|
|
|
String nickName;
|
|
|
|
|
String tel;
|
|
|
|
@ -28,7 +28,7 @@ class UserInfoModel {
|
|
|
|
|
|
|
|
|
|
UserInfoModel(
|
|
|
|
|
{this.id,
|
|
|
|
|
this.imgUrls,
|
|
|
|
|
this.imgUrl,
|
|
|
|
|
this.name,
|
|
|
|
|
this.nickName,
|
|
|
|
|
this.tel,
|
|
|
|
@ -37,23 +37,12 @@ class UserInfoModel {
|
|
|
|
|
|
|
|
|
|
UserInfoModel.fromJson(Map<String, dynamic> json) {
|
|
|
|
|
id = json['id'];
|
|
|
|
|
imgUrls = json['imgUrls'].cast<String>();
|
|
|
|
|
if (json['imgUrls'] != null)
|
|
|
|
|
imgUrl = (json['imgUrls'] as List).first['url'];
|
|
|
|
|
name = json['name'];
|
|
|
|
|
nickName = json['nickName'];
|
|
|
|
|
tel = json['tel'];
|
|
|
|
|
sex = json['sex'];
|
|
|
|
|
birthday = json['birthday'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
|
|
|
data['id'] = this.id;
|
|
|
|
|
data['imgUrls'] = this.imgUrls;
|
|
|
|
|
data['name'] = this.name;
|
|
|
|
|
data['nickName'] = this.nickName;
|
|
|
|
|
data['tel'] = this.tel;
|
|
|
|
|
data['sex'] = this.sex;
|
|
|
|
|
data['birthday'] = this.birthday;
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|