implemented IconPicker for Car class

This commit is contained in:
2022-11-16 22:54:45 -05:00
parent bc0e5f1fea
commit 4cfffa59f9
89 changed files with 342 additions and 60 deletions

View File

@@ -5,8 +5,9 @@ class Car {
static const colNickname = 'nickname';
static const colPlate = 'plate';
static const colMileage = 'mileage';
static const colIcon = 'icon';
Car({this.id, this.vin, this.plate, this.nickname, this.mileage});
Car({this.id, this.vin, this.plate, this.nickname, this.mileage, this.icon});
Car.fromMap(Map<String, dynamic> map) {
id = map[colId];
@@ -14,6 +15,7 @@ class Car {
nickname = map[colNickname];
plate = map[colPlate];
mileage = map[colMileage];
icon = map[colIcon];
}
int? id;
@@ -21,6 +23,7 @@ class Car {
String? plate;
String? nickname;
int? mileage;
String? icon;
Map<String, dynamic> toMap() {
var map = <String, dynamic>{
@@ -28,6 +31,7 @@ class Car {
colPlate: plate,
colNickname: nickname,
colMileage: mileage,
colIcon: icon,
};
// if (id != null) {
// map[colId] = id; //not sure https://www.youtube.com/watch?v=tj7Lj9a3fyM