Files
app-grosir/lib/models/user_profile.dart
2026-07-23 22:12:32 +07:00

26 lines
504 B
Dart

class UserProfile {
final String id;
final String role;
final String? fullName;
UserProfile({
required this.id,
required this.role,
this.fullName,
});
factory UserProfile.fromJson(Map<String, dynamic> json) {
return UserProfile(
id: json['id'] as String,
role: json['role'] as String,
fullName: json['full_name'] as String?,
);
}
Map<String, dynamic> toJson() => {
'id': id,
'role': role,
'full_name': fullName,
};
}