import 'package:json_annotation/json_annotation.dart'; part 'activityModel.g.dart'; @JsonSerializable() class ActivityModel { final String name; final String startTime; final String place; final String? description; final DateTime date; final String? endTime; ActivityModel({ required this.name, required this.startTime, required this.place, this.description, required this.date, this.endTime, }); factory ActivityModel.fromJson(Map json) => _$ActivityModelFromJson(json); Map toJson() => _$ActivityModelToJson(this); }