prasule/lib/api/entry_data.dart
Matyáš Caras 238caf9203
fix: make edit_categories actually edit categories
Also make sure home loads the wallet again after exiting settings. Also removed 'type' from Category, because I don't know what it was supposed to do there.
2023-12-31 12:41:10 +01:00

25 lines
627 B
Dart

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 method
factory EntryData.fromJson(Map<String, dynamic> json) =>
_$EntryDataFromJson(json);
/// Name of entry
String name;
/// Optional description, default is empty
String description;
/// Amount for entry
double amount;
/// Connects generated toJson method
Map<String, dynamic> toJson() => _$EntryDataToJson(this);
}