feat : Modèle avec sérialisation automatique
This commit is contained in:
26
lib/models/event.g.dart
Normal file
26
lib/models/event.g.dart
Normal file
@@ -0,0 +1,26 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'event.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
Event _$EventFromJson(Map<String, dynamic> json) => Event(
|
||||
name: json['name'] as String,
|
||||
picture: json['picture'] as String,
|
||||
organizer: json['organizer'] as String,
|
||||
date:
|
||||
json['date'] == null ? null : DateTime.parse(json['date'] as String),
|
||||
place: json['place'] as String?,
|
||||
isFavorite: json['isFavorite'] as bool? ?? false,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$EventToJson(Event instance) => <String, dynamic>{
|
||||
'name': instance.name,
|
||||
'picture': instance.picture,
|
||||
'organizer': instance.organizer,
|
||||
'place': instance.place,
|
||||
'date': instance.date?.toIso8601String(),
|
||||
'isFavorite': instance.isFavorite,
|
||||
};
|
||||
Reference in New Issue
Block a user