class User { final int id; final String? username; final String? firstName; final String? lastName; final String? email; final bool? isActive; User({ required this.id, required this.username, required this.firstName, required this.lastName, required this.email, required this.isActive, }); factory User.fromJson(Map json) => User( id: json["id"], username: json["username"], firstName: json["first_name"], lastName: json["last_name"], email: json["email"], isActive: json["is_active"], ); Map toJson() => { "id": id, "username": username, "first_name": firstName, "last_name": lastName, "email": email, "is_active": isActive, }; }