forked from eatvio/eatvio_app
27 lines
1.0 KiB
Dart
27 lines
1.0 KiB
Dart
import 'package:eatvio_app/features/feed/models/recipes_model.dart';
|
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
|
|
part 'recipes_pagination_model.freezed.dart';
|
|
|
|
part 'recipes_pagination_model.g.dart';
|
|
|
|
@freezed
|
|
class RecipesPagination with _$RecipesPagination {
|
|
const factory RecipesPagination({
|
|
@JsonKey(name: 'data') required List<Recipe> recipesList,
|
|
// @JsonKey(name: "current_page") required int currentPage,
|
|
// @JsonKey(name: "first_page_url") required String firstPageUrl,
|
|
// required int from,
|
|
// @JsonKey(name: "last_page") required int lastPage,
|
|
// @JsonKey(name: "last_page_url") required String lastPageUrl,
|
|
// @JsonKey(name: "next_page_url") required String nextPageUrl,
|
|
// required String path,
|
|
// @JsonKey(name: "per_page") required int perPage,
|
|
// @JsonKey(name: "prev_page_url") required dynamic prevPageUrl,
|
|
// required int to,
|
|
// required int total,
|
|
}) = _RecipesPagination;
|
|
|
|
factory RecipesPagination.fromJson(Map<String, Object?> json) => _$RecipesPaginationFromJson(json);
|
|
}
|