import 'package:json_annotation/json_annotation.dart'; part 'entry_data.g.dart'; /// Contains raw data @JsonSerializable() class EntryData { /// Contains raw data EntryData({required this.name, required this.amount, this.description = ""}); /// Connects generated fromJson function factory EntryData.fromJson(Map json) => _$EntryDataFromJson(json); /// Name of entry String name; /// Optional description, default is empty String description; /// Amount for entry double amount; /// Connects generated toJson function Map toJson() => _$EntryDataToJson(this); }