mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 09:45:22 +00:00
52 lines
1.2 KiB
Dart
52 lines
1.2 KiB
Dart
class UserModel {
|
|
final String? id;
|
|
final String? email;
|
|
final String? name;
|
|
final String? photoUrl;
|
|
|
|
final String? phoneNumber;
|
|
|
|
final bool? isAnonymous;
|
|
|
|
final bool? isEmailVerified;
|
|
|
|
final bool? isAgreementAccepted;
|
|
|
|
UserModel({
|
|
required this.id,
|
|
required this.email,
|
|
required this.name,
|
|
required this.photoUrl,
|
|
required this.phoneNumber,
|
|
required this.isAnonymous,
|
|
required this.isEmailVerified,
|
|
required this.isAgreementAccepted,
|
|
});
|
|
|
|
factory UserModel.fromJson(Map<String, dynamic> json) {
|
|
return UserModel(
|
|
id: json['id'],
|
|
email: json['email'],
|
|
name: json['name'],
|
|
photoUrl: json['photoUrl'],
|
|
phoneNumber: json['phoneNumber'],
|
|
isAnonymous: json['isAnonymous'],
|
|
isEmailVerified: json['isEmailVerified'],
|
|
isAgreementAccepted: json['isAgreementAccepted'],
|
|
);
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
return {
|
|
'id': id,
|
|
'email': email,
|
|
'name': name,
|
|
'photoUrl': photoUrl,
|
|
'phoneNumber': phoneNumber,
|
|
'isAnonymous': isAnonymous,
|
|
'isEmailVerified': isEmailVerified,
|
|
'isAgreementAccepted': isAgreementAccepted,
|
|
};
|
|
}
|
|
}
|