Working api call to backend

This commit is contained in:
Nathan Anderson
2023-07-19 02:16:13 -06:00
parent 37c644ab0d
commit eba628bb4c
26 changed files with 1094 additions and 119 deletions
+27
View File
@@ -0,0 +1,27 @@
import 'package:json_annotation/json_annotation.dart';
import '../global/utils.dart';
part 'family_model.g.dart';
@JsonSerializable()
class FamilyModel {
const FamilyModel({
required this.id,
required this.budgetId,
required this.createdAt,
required this.updatedAt,
});
final int id, budgetId;
@JsonKey(fromJson: dateFromJson, toJson: dateToJson)
final DateTime createdAt;
@JsonKey(fromJson: dateFromJson, toJson: dateToJson)
final DateTime updatedAt;
factory FamilyModel.fromJson(Map<String, dynamic> json) =>
_$FamilyModelFromJson(json);
Map<String, dynamic> toJson() => _$FamilyModelToJson(this);
}