修复bug-可回退
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'package:maibu_satabot_v2/core/data/base_model.dart';
|
||||
import 'package:maibu_satabot_v2/core/utils/json_safe.dart';
|
||||
|
||||
import '../../../../core/domain/entities/user_entity.dart';
|
||||
|
||||
@@ -14,15 +15,14 @@ class UserModel extends UserEntity implements BaseModel {
|
||||
});
|
||||
|
||||
factory UserModel.fromJson(Map<String, dynamic> json) {
|
||||
print(json);
|
||||
return UserModel(
|
||||
userId: json['userId'],
|
||||
username: json['username'],
|
||||
nickname: json['nickName'],
|
||||
token: json['token'],
|
||||
avatar: json['avatar'],
|
||||
email: json['email'],
|
||||
phone: json['phone'],
|
||||
userId: JsonSafe.asString(json['userId']),
|
||||
username: JsonSafe.asString(json['username']),
|
||||
nickname: JsonSafe.asString(json['nickName']),
|
||||
token: JsonSafe.asString(json['token']),
|
||||
avatar: JsonSafe.asStringOrNull(json['avatar']),
|
||||
email: JsonSafe.asStringOrNull(json['email']),
|
||||
phone: JsonSafe.asStringOrNull(json['phone']),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user