You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
152 lines
4.1 KiB
Dart
152 lines
4.1 KiB
Dart
|
3 weeks ago
|
class FloorMapModel {
|
||
|
|
int? id;
|
||
|
|
String? mapUrl;
|
||
|
|
String? geojsonUrl;
|
||
|
|
String? mapBase64;
|
||
|
|
Map<String, dynamic>? geojsonData;
|
||
|
|
|
||
|
|
FloorMapModel({this.id, this.mapUrl, this.geojsonUrl, this.mapBase64, this.geojsonData});
|
||
|
|
|
||
|
|
FloorMapModel.fromJson(Map<String, dynamic> json) {
|
||
|
|
id = json['id'];
|
||
|
|
mapUrl = json['mapUrl'];
|
||
|
|
geojsonUrl = json['geojsonUrl'];
|
||
|
|
mapBase64 = json['mapBase64'];
|
||
|
|
geojsonData = json['geojsonData'];
|
||
|
|
}
|
||
|
|
|
||
|
|
Map<String, dynamic> toJson() {
|
||
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||
|
|
data['id'] = this.id;
|
||
|
|
data['mapUrl'] = this.mapUrl;
|
||
|
|
data['geojsonUrl'] = this.geojsonUrl;
|
||
|
|
data['mapBase64'] = this.mapBase64;
|
||
|
|
if (this.geojsonData != null) {
|
||
|
|
// data['geojsonData'] = this.geojsonData!.toJson();
|
||
|
|
}
|
||
|
|
return data;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
// class GeojsonData {
|
||
|
|
// String? type;
|
||
|
|
// List<Features>? features;
|
||
|
|
//
|
||
|
|
// GeojsonData({this.type, this.features});
|
||
|
|
//
|
||
|
|
// GeojsonData.fromJson(Map<String, dynamic> json) {
|
||
|
|
// type = json['type'];
|
||
|
|
// if (json['features'] != null) {
|
||
|
|
// features = <Features>[];
|
||
|
|
// json['features'].forEach((v) { features!.add(new Features.fromJson(v)); });
|
||
|
|
// }
|
||
|
|
// }
|
||
|
|
//
|
||
|
|
// Map<String, dynamic> toJson() {
|
||
|
|
// final Map<String, dynamic> data = new Map<String, dynamic>();
|
||
|
|
// data['type'] = this.type;
|
||
|
|
// if (this.features != null) {
|
||
|
|
// data['features'] = this.features!.map((v) => v.toJson()).toList();
|
||
|
|
// }
|
||
|
|
// return data;
|
||
|
|
// }
|
||
|
|
// }
|
||
|
|
|
||
|
|
// class Features {
|
||
|
|
// String? type;
|
||
|
|
// Properties? properties;
|
||
|
|
// Geometry? geometry;
|
||
|
|
//
|
||
|
|
// Features({this.type, this.properties, this.geometry});
|
||
|
|
//
|
||
|
|
// Features.fromJson(Map<String, dynamic> json) {
|
||
|
|
// type = json['type'];
|
||
|
|
// properties = json['properties'] != null ? new Properties.fromJson(json['properties']) : null;
|
||
|
|
// geometry = json['geometry'] != null ? new Geometry.fromJson(json['geometry']) : null;
|
||
|
|
// }
|
||
|
|
//
|
||
|
|
// Map<String, dynamic> toJson() {
|
||
|
|
// final Map<String, dynamic> data = new Map<String, dynamic>();
|
||
|
|
// data['type'] = this.type;
|
||
|
|
// if (this.properties != null) {
|
||
|
|
// data['properties'] = this.properties!.toJson();
|
||
|
|
// }
|
||
|
|
// if (this.geometry != null) {
|
||
|
|
// data['geometry'] = this.geometry!.toJson();
|
||
|
|
// }
|
||
|
|
// return data;
|
||
|
|
// }
|
||
|
|
// }
|
||
|
|
//
|
||
|
|
// class Properties {
|
||
|
|
// int? ff;
|
||
|
|
// int? id;
|
||
|
|
// String? fill;
|
||
|
|
// int? fillOpacity;
|
||
|
|
// String? stroke;
|
||
|
|
// int? strokeOpacity;
|
||
|
|
// int? strokeWidth;
|
||
|
|
//
|
||
|
|
// Properties({this.ff, this.id, this.fill, this.fillOpacity, this.stroke, this.strokeOpacity, this.strokeWidth});
|
||
|
|
//
|
||
|
|
// Properties.fromJson(Map<String, dynamic> json) {
|
||
|
|
// ff = json['ff'];
|
||
|
|
// id = json['id'];
|
||
|
|
// fill = json['fill'];
|
||
|
|
// fillOpacity = json['fillOpacity'];
|
||
|
|
// stroke = json['stroke'];
|
||
|
|
// strokeOpacity = json['strokeOpacity'];
|
||
|
|
// strokeWidth = json['strokeWidth'];
|
||
|
|
// }
|
||
|
|
//
|
||
|
|
// Map<String, dynamic> toJson() {
|
||
|
|
// final Map<String, dynamic> data = new Map<String, dynamic>();
|
||
|
|
// data['ff'] = this.ff;
|
||
|
|
// data['id'] = this.id;
|
||
|
|
// data['fill'] = this.fill;
|
||
|
|
// data['fillOpacity'] = this.fillOpacity;
|
||
|
|
// data['stroke'] = this.stroke;
|
||
|
|
// data['strokeOpacity'] = this.strokeOpacity;
|
||
|
|
// data['strokeWidth'] = this.strokeWidth;
|
||
|
|
// return data;
|
||
|
|
// }
|
||
|
|
// }
|
||
|
|
|
||
|
|
// class Geometry {
|
||
|
|
// String? type;
|
||
|
|
// List<List>? coordinates;
|
||
|
|
//
|
||
|
|
// Geometry({this.type, this.coordinates});
|
||
|
|
//
|
||
|
|
// Geometry.fromJson(Map<String, dynamic> json) {
|
||
|
|
// type = json['type'];
|
||
|
|
// if (json['coordinates'] != null) {
|
||
|
|
// coordinates = <List>[];
|
||
|
|
// json['coordinates'].forEach((v) { coordinates!.add(new List.fromJson(v)); });
|
||
|
|
// }
|
||
|
|
// }
|
||
|
|
//
|
||
|
|
// Map<String, dynamic> toJson() {
|
||
|
|
// final Map<String, dynamic> data = new Map<String, dynamic>();
|
||
|
|
// data['type'] = this.type;
|
||
|
|
// if (this.coordinates != null) {
|
||
|
|
// data['coordinates'] = this.coordinates!.map((v) => v.toJson()).toList();
|
||
|
|
// }
|
||
|
|
// return data;
|
||
|
|
// }
|
||
|
|
// }
|
||
|
|
//
|
||
|
|
// class Coordinates {
|
||
|
|
//
|
||
|
|
//
|
||
|
|
// Coordinates({});
|
||
|
|
//
|
||
|
|
// Coordinates.fromJson(Map<String, dynamic> json) {
|
||
|
|
// }
|
||
|
|
//
|
||
|
|
// Map<String, dynamic> toJson() {
|
||
|
|
// final Map<String, dynamic> data = new Map<String, dynamic>();
|
||
|
|
// return data;
|
||
|
|
// }
|
||
|
|
// }
|