* Workforce, Schedule generation and geofencing.
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
class GeofenceConfig {
|
||||
GeofenceConfig({
|
||||
required this.lat,
|
||||
required this.lng,
|
||||
required this.radiusMeters,
|
||||
});
|
||||
|
||||
final double lat;
|
||||
final double lng;
|
||||
final double radiusMeters;
|
||||
|
||||
factory GeofenceConfig.fromJson(Map<String, dynamic> json) {
|
||||
return GeofenceConfig(
|
||||
lat: (json['lat'] as num).toDouble(),
|
||||
lng: (json['lng'] as num).toDouble(),
|
||||
radiusMeters: (json['radius_m'] as num).toDouble(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class AppSetting {
|
||||
AppSetting({required this.key, required this.value});
|
||||
|
||||
final String key;
|
||||
final Map<String, dynamic> value;
|
||||
|
||||
factory AppSetting.fromMap(Map<String, dynamic> map) {
|
||||
return AppSetting(
|
||||
key: map['key'] as String,
|
||||
value: Map<String, dynamic>.from(map['value'] as Map),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user