import 'package:json_annotation/json_annotation.dart'; part 'entry_data.g.dart'; @JsonSerializable() class EntryData { String name; String description; double amount; EntryData({required this.name, required this.amount, this.description = ""}); factory EntryData.fromJson(Map json) => _$EntryDataFromJson(json); Map toJson() => _$EntryDataToJson(this); }