new project stable version

This commit is contained in:
2026-05-10 19:11:31 +03:00
commit 3616f84556
391 changed files with 23857 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
import 'scooter.dart';
class ActiveScooterOrder {
final int orderId;
final int scooterId;
final double latitude;
final double longitude;
final double mileage;
final double speed;
final double price;
final double time;
final bool zone;
ActiveScooterOrder({
required this.orderId,
required this.scooterId,
required this.latitude,
required this.longitude,
required this.mileage,
required this.speed,
required this.price,
required this.time,
required this.zone,
});
factory ActiveScooterOrder.fromJson(Map<String, dynamic> json) {
return ActiveScooterOrder(
orderId: json['orderId'] ?? 0,
scooterId: json['scooterId'] ?? 0,
latitude: (json['latitude'] ?? 0).toDouble(),
longitude: (json['longitude'] ?? 0).toDouble(),
mileage: (json['mileage'] ?? 0).toDouble(),
speed: (json['speed'] ?? 0).toDouble(),
price: (json['price'] ?? 0).toDouble(),
time: (json['time'] ?? 0.0).toDouble(),
zone: json['zone'],
);
}
Map<String, dynamic> toJson() {
return {
'orderId': orderId,
'scooterId': scooterId,
'latitude': latitude,
'longitude': longitude,
'mileage': mileage,
'speed': speed,
'price': price,
};
}
}