forked from eatvio/eatvio_app
feat: introduce My Diets and Create Diet features with associated UI, state management, and data handling.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:eatvio_app/features/feed/models/plan_pagination_model.dart';
|
||||
import 'package:eatvio_app/features/my_plans/services/my_plans_service.dart';
|
||||
|
||||
@@ -14,24 +16,11 @@ class MyPlansRepository {
|
||||
}
|
||||
}
|
||||
|
||||
Future<PlanPaginationModel> getPlans({
|
||||
int page = 1,
|
||||
String? query,
|
||||
String? types,
|
||||
int? duration,
|
||||
int? minPrice,
|
||||
int? maxPrice,
|
||||
}) async {
|
||||
Future<PlanPaginationModel> getPlans({int page = 1, String? query, String? types, int? duration, int? minPrice, int? maxPrice}) async {
|
||||
try {
|
||||
return (await myPlansService.getPlans(
|
||||
page: page,
|
||||
query: query,
|
||||
types: types,
|
||||
duration: duration,
|
||||
minPrice: minPrice,
|
||||
maxPrice: maxPrice,
|
||||
));
|
||||
} catch (e) {
|
||||
return (await myPlansService.getPlans(page: page, query: query, types: types, duration: duration, minPrice: minPrice, maxPrice: maxPrice));
|
||||
} catch (e, st) {
|
||||
log(e.toString(), error: e, stackTrace: st);
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user