Adds flight,battery models and image file managment

This commit is contained in:
2025-07-04 23:39:34 +02:00
parent 72a8d25318
commit 3925421428
13 changed files with 485 additions and 36 deletions

33
lib/models/battery.dart Normal file
View File

@ -0,0 +1,33 @@
class Battery {
int? id;
String name;
String type;
double voltage;
String? imageUuid;
Battery({
this.id,
required this.name,
required this.type,
required this.voltage,
this.imageUuid,
});
factory Battery.fromMap(Map<String, dynamic> map) => Battery(
id: map["id"],
name: map["name"],
type: map["type"],
voltage: map["voltage"],
imageUuid: map["image_uuid"],
);
Map<String, dynamic> toMap() {
return {
"id": id,
"name": name,
"type": type,
"voltage": voltage,
"image_uuid": imageUuid,
};
}
}