30 lines
698 B
Dart
30 lines
698 B
Dart
class UserProfile {
|
|
const UserProfile({
|
|
required this.id,
|
|
required this.username,
|
|
required this.name,
|
|
required this.phone,
|
|
required this.email,
|
|
required this.gender,
|
|
required this.age,
|
|
});
|
|
|
|
final String id;
|
|
final String username;
|
|
final String name;
|
|
final String phone;
|
|
final String email;
|
|
final String gender;
|
|
final int age;
|
|
|
|
factory UserProfile.fromJson(Map<String, dynamic> json) => UserProfile(
|
|
id: json['id'] as String,
|
|
username: json['username'] as String,
|
|
name: json['name'] as String,
|
|
phone: json['phone'] as String,
|
|
email: json['email'] as String,
|
|
gender: json['gender'] as String,
|
|
age: json['age'] as int,
|
|
);
|
|
}
|