class FamilleProduit { int? id; String? name; FamilleProduit({this.id, this.name}); FamilleProduit.fromJson(Map json) { id = json['id']; name = json['name']; } Map toJson() { final Map data = {}; data['id'] = id; data['name'] = name; return data; } @override bool operator ==(Object other) => identical(this, other) || other is FamilleProduit && runtimeType == other.runtimeType && id == other.id; @override String toString() => name ?? 'Unknown'; @override int get hashCode => id.hashCode; }