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 'fireNotification.dart';
|
||||
|
|
@ -8,67 +6,31 @@ part of 'fireNotification.dart';
|
|||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
FireNotification _$FireNotificationFromJson(Map<String, dynamic> json) =>
|
||||
new FireNotification(
|
||||
id: objectIdFromJson(json['id'] as String),
|
||||
lat: (json['lat'] as num).toDouble(),
|
||||
lon: (json['lon'] as num).toDouble(),
|
||||
description: json['description'] as String,
|
||||
when: DateTime.parse(json['when'] as String),
|
||||
read: json['read'] as bool,
|
||||
sealed: json['sealed'] as String,
|
||||
subsId: objectIdFromJson(json['subsId'] as String));
|
||||
|
||||
abstract class _$FireNotificationSerializerMixin {
|
||||
ObjectId get id;
|
||||
double get lat;
|
||||
double get lon;
|
||||
String get description;
|
||||
DateTime get when;
|
||||
String get sealed;
|
||||
ObjectId get subsId;
|
||||
bool get read;
|
||||
Map<String, dynamic> toJson() => new _$FireNotificationJsonMapWrapper(this);
|
||||
FireNotification _$FireNotificationFromJson(Map json) {
|
||||
return $checkedNew('FireNotification', json, () {
|
||||
final val = FireNotification(
|
||||
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),
|
||||
when: $checkedConvert(json, 'when', (v) => DateTime.parse(v as String)),
|
||||
read: $checkedConvert(json, 'read', (v) => v as bool),
|
||||
sealed: $checkedConvert(json, 'sealed', (v) => v as String),
|
||||
subsId:
|
||||
$checkedConvert(json, 'subsId', (v) => objectIdFromJson(v as String)),
|
||||
);
|
||||
return val;
|
||||
});
|
||||
}
|
||||
|
||||
class _$FireNotificationJsonMapWrapper extends $JsonMapWrapper {
|
||||
final _$FireNotificationSerializerMixin _v;
|
||||
_$FireNotificationJsonMapWrapper(this._v);
|
||||
|
||||
@override
|
||||
Iterable<String> get keys => const [
|
||||
'id',
|
||||
'lat',
|
||||
'lon',
|
||||
'description',
|
||||
'when',
|
||||
'sealed',
|
||||
'subsId',
|
||||
'read'
|
||||
];
|
||||
|
||||
@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 'when':
|
||||
return _v.when.toIso8601String();
|
||||
case 'sealed':
|
||||
return _v.sealed;
|
||||
case 'subsId':
|
||||
return objectIdToJson(_v.subsId);
|
||||
case 'read':
|
||||
return _v.read;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Map<String, dynamic> _$FireNotificationToJson(FireNotification instance) =>
|
||||
<String, dynamic>{
|
||||
'id': objectIdToJson(instance.id),
|
||||
'lat': instance.lat,
|
||||
'lon': instance.lon,
|
||||
'description': instance.description,
|
||||
'when': instance.when.toIso8601String(),
|
||||
'sealed': instance.sealed,
|
||||
'subsId': objectIdToJson(instance.subsId),
|
||||
'read': instance.read,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue