Added Google Drive storage location

This commit is contained in:
Courtney Arnold 2026-08-08 14:59:18 -05:00
parent e630f2a3ec
commit 73a7c93e64
22 changed files with 1690 additions and 205 deletions

View file

@ -4,6 +4,7 @@ class Vehicle {
final String model;
final String color;
final String licensePlate;
final DateTime updatedAt;
Vehicle({
required this.id,
@ -11,6 +12,7 @@ class Vehicle {
required this.model,
required this.color,
required this.licensePlate,
required this.updatedAt,
});
String get displayName => '$color $make $model ($licensePlate)';
@ -20,6 +22,7 @@ class Vehicle {
String? model,
String? color,
String? licensePlate,
DateTime? updatedAt,
}) {
return Vehicle(
id: id,
@ -27,6 +30,7 @@ class Vehicle {
model: model ?? this.model,
color: color ?? this.color,
licensePlate: licensePlate ?? this.licensePlate,
updatedAt: updatedAt ?? this.updatedAt,
);
}
@ -36,6 +40,7 @@ class Vehicle {
'model': model,
'color': color,
'licensePlate': licensePlate,
'updatedAt': updatedAt.toIso8601String(),
};
factory Vehicle.fromJson(Map<String, dynamic> json) => Vehicle(
@ -44,5 +49,8 @@ class Vehicle {
model: json['model'] as String,
color: json['color'] as String,
licensePlate: json['licensePlate'] as String,
updatedAt: json['updatedAt'] != null
? DateTime.parse(json['updatedAt'] as String)
: DateTime.fromMillisecondsSinceEpoch(0),
);
}