Adds drone model, db helper.

This commit is contained in:
2025-07-04 17:19:46 +02:00
parent 0266bf924b
commit fb6a20fd75
13 changed files with 1039 additions and 3 deletions

24
lib/models/drone.dart Normal file
View File

@ -0,0 +1,24 @@
import 'package:image/image.dart' as img;
class Drone
{
final int? id;
final String name;
//final img.Image image;
Drone ({this.id, required this.name}); //required this.image});
factory Drone.fromMap(Map<String, dynamic> map) => Drone
(
id: map["id"],
name: map["name"],
//image: img.decodeJpg(map["image"])!,
);
Map<String, dynamic> toMap() =>
{
"id": id,
"name": name,
//"image": img.encodeJpg(image),
};
}