import 'package:json_annotation/json_annotation.dart'; part 'informationModel.g.dart'; @JsonSerializable() class InformationModel { final String title; final String content; final String author; final DateTime createdAt; InformationModel({ required this.title, required this.content, required this.author, required this.createdAt, }); factory InformationModel.fromJson(Map json) => _$InformationModelFromJson(json); Map toJson() => _$InformationModelToJson(this); }