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