1234567891011121314151617181920212223242526272829303132333435 |
- /// User model类
- /// Time:
- /// Copyright © 2021 liuyuqi.gov@msn.cn. All Rights Reserved.
- class UserModel {
- String userid = "";
- String userName = "";
- String token = "";
- UserModel.fromJson(Map<String, dynamic> json) {
- userid = json['userid'];
- userName = json['userName'];
- token = json['token'];
- }
- Map<String, dynamic> toJson(UserModel user) {
- return {
- 'userid': userid,
- 'userName': userName,
- 'token': token,
- };
- }
- }
- class UserEntity {
- List<UserModel> users = [];
- UserEntity.fromJson(Map<String, dynamic> json) {
- if (json['users'] != null) {
- users = List<UserModel>.empty();
- json['users'].forEach((v) {
- users.add(UserModel.fromJson(v));
- });
- }
- }
- }
|