Last changes not published
This commit is contained in:
parent
ac65ccf990
commit
21ec08303a
43 changed files with 607 additions and 613 deletions
|
|
@ -1,5 +1,3 @@
|
|||
// Copyright (c) 2018, Comunes Association.
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'yourLocation.dart';
|
||||
|
|
@ -8,51 +6,29 @@ part of 'yourLocation.dart';
|
|||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
YourLocation _$YourLocationFromJson(Map<String, dynamic> json) =>
|
||||
new YourLocation(
|
||||
id: objectIdFromJson(json['id'] as String),
|
||||
lat: (json['lat'] as num).toDouble(),
|
||||
lon: (json['lon'] as num).toDouble(),
|
||||
description: json['description'] as String,
|
||||
distance: json['distance'] as int,
|
||||
subscribed: json['subscribed'] as bool);
|
||||
|
||||
abstract class _$YourLocationSerializerMixin {
|
||||
ObjectId get id;
|
||||
double get lat;
|
||||
double get lon;
|
||||
String get description;
|
||||
bool get subscribed;
|
||||
int get distance;
|
||||
Map<String, dynamic> toJson() => new _$YourLocationJsonMapWrapper(this);
|
||||
YourLocation _$YourLocationFromJson(Map json) {
|
||||
return $checkedNew('YourLocation', json, () {
|
||||
final val = YourLocation(
|
||||
id: $checkedConvert(json, 'id', (v) => objectIdFromJson(v as String)),
|
||||
lat: $checkedConvert(json, 'lat', (v) => (v as num).toDouble()),
|
||||
lon: $checkedConvert(json, 'lon', (v) => (v as num).toDouble()),
|
||||
description: $checkedConvert(json, 'description', (v) => v as String),
|
||||
distance: $checkedConvert(json, 'distance', (v) => v as int),
|
||||
currentNumFires:
|
||||
$checkedConvert(json, 'currentNumFires', (v) => v as int),
|
||||
subscribed: $checkedConvert(json, 'subscribed', (v) => v as bool),
|
||||
);
|
||||
return val;
|
||||
});
|
||||
}
|
||||
|
||||
class _$YourLocationJsonMapWrapper extends $JsonMapWrapper {
|
||||
final _$YourLocationSerializerMixin _v;
|
||||
_$YourLocationJsonMapWrapper(this._v);
|
||||
|
||||
@override
|
||||
Iterable<String> get keys =>
|
||||
const ['id', 'lat', 'lon', 'description', 'subscribed', 'distance'];
|
||||
|
||||
@override
|
||||
dynamic operator [](Object key) {
|
||||
if (key is String) {
|
||||
switch (key) {
|
||||
case 'id':
|
||||
return objectIdToJson(_v.id);
|
||||
case 'lat':
|
||||
return _v.lat;
|
||||
case 'lon':
|
||||
return _v.lon;
|
||||
case 'description':
|
||||
return _v.description;
|
||||
case 'subscribed':
|
||||
return _v.subscribed;
|
||||
case 'distance':
|
||||
return _v.distance;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Map<String, dynamic> _$YourLocationToJson(YourLocation instance) =>
|
||||
<String, dynamic>{
|
||||
'id': objectIdToJson(instance.id),
|
||||
'lat': instance.lat,
|
||||
'lon': instance.lon,
|
||||
'description': instance.description,
|
||||
'subscribed': instance.subscribed,
|
||||
'distance': instance.distance,
|
||||
'currentNumFires': instance.currentNumFires,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue