Adds the Flutter inventory app source, cleaned up for a shared repo: generic package name, no hardcoded ERP endpoints (moved to gitignored local config), no dead auth code, no debug logging of session data.
32 lines
635 B
Dart
32 lines
635 B
Dart
class FamilleProduit {
|
|
int? id;
|
|
String? name;
|
|
|
|
FamilleProduit({this.id, this.name});
|
|
|
|
FamilleProduit.fromJson(Map<dynamic, dynamic> json) {
|
|
id = json['id'];
|
|
name = json['name'];
|
|
}
|
|
|
|
Map<dynamic, dynamic> toJson() {
|
|
final Map<dynamic, dynamic> 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;
|
|
}
|