Add full app source
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.
This commit is contained in:
31
lib/models/famille_produit.dart
Normal file
31
lib/models/famille_produit.dart
Normal file
@@ -0,0 +1,31 @@
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user