import 'package:fooder/client/based.dart'; class EntryClient extends BasedClient { const EntryClient({required super.apiClient}); Future create({ required double grams, required int productId, required int mealId, }) async { var entry = { "grams": grams, "product_id": productId, "meal_id": mealId, }; await apiClient.post("/entry", entry); } Future delete(int id) async { await apiClient.delete("/entry/$id"); } Future update( int id, { required double grams, required int productId, required int mealId, }) async { var entry = { "grams": grams, "product_id": productId, "meal_id": mealId, }; await apiClient.patch("/entry/$id", entry); } }