refactor: profile model

This commit is contained in:
mso7nueh
2024-09-09 18:18:35 +03:00
parent 3ccf5b6d92
commit 8ea819c5bc
77 changed files with 2735 additions and 2950 deletions

View File

@@ -22,7 +22,7 @@ class Meta with _$Meta {
@JsonKey(name: "from") required dynamic from,
@JsonKey(name: "last_page") required int lastPage,
@JsonKey(name: "links") required List<Link> links,
@JsonKey(name: "path") required String path,
@JsonKey(name: "path") String? path,
@JsonKey(name: "per_page") required int perPage,
@JsonKey(name: "to") required dynamic to,
@JsonKey(name: "total") required int total,
@@ -34,9 +34,9 @@ class Meta with _$Meta {
@freezed
class Link with _$Link {
const factory Link({
@JsonKey(name: "url") required String? url,
@JsonKey(name: "label") required String label,
@JsonKey(name: "active") required bool active,
@JsonKey(name: "url") String? url,
@JsonKey(name: "label") String? label,
@JsonKey(name: "active") bool? active,
}) = _Link;
factory Link.fromJson(Map<String, Object?> json) => _$LinkFromJson(json);