From 431f7496745b50d6c9c2e4ea2e5cbb426e5bed80 Mon Sep 17 00:00:00 2001 From: Roland Geider Date: Thu, 6 May 2021 14:01:42 +0200 Subject: [PATCH] Start adding user gallery --- lib/main.dart | 2 + lib/models/gallery/image.dart | 48 ++++++++++ lib/models/gallery/image.g.dart | 24 +++++ lib/providers/workout_plans.dart | 28 ++++++ lib/screens/dashboard.dart | 2 + lib/screens/gallery_screen.dart | 60 ++++++++++++ lib/screens/workout_plans_screen.dart | 32 ++++++- lib/widgets/core/core.dart | 8 +- lib/widgets/gallery/overview.dart | 46 +++++++++ test/workout_form_test.mocks.dart | 129 ++++++++++++++------------ 10 files changed, 319 insertions(+), 60 deletions(-) create mode 100644 lib/models/gallery/image.dart create mode 100644 lib/models/gallery/image.g.dart create mode 100644 lib/screens/gallery_screen.dart create mode 100644 lib/widgets/gallery/overview.dart diff --git a/lib/main.dart b/lib/main.dart index 59a35092..4f93faa6 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -26,6 +26,7 @@ import 'package:wger/providers/workout_plans.dart'; import 'package:wger/screens/auth_screen.dart'; import 'package:wger/screens/dashboard.dart'; import 'package:wger/screens/form_screen.dart'; +import 'package:wger/screens/gallery_screen.dart'; import 'package:wger/screens/gym_mode.dart'; import 'package:wger/screens/home_tabs_screen.dart'; import 'package:wger/screens/nutritional_plan_screen.dart'; @@ -89,6 +90,7 @@ class MyApp extends StatelessWidget { routes: { DashboardScreen.routeName: (ctx) => DashboardScreen(), FormScreen.routeName: (ctx) => FormScreen(), + GalleryScreen.routeName: (ctx) => GalleryScreen(), GymModeScreen.routeName: (ctx) => GymModeScreen(), HomeTabsScreen.routeName: (ctx) => HomeTabsScreen(), NutritionScreen.routeName: (ctx) => NutritionScreen(), diff --git a/lib/models/gallery/image.dart b/lib/models/gallery/image.dart new file mode 100644 index 00000000..68224e30 --- /dev/null +++ b/lib/models/gallery/image.dart @@ -0,0 +1,48 @@ +/* + * This file is part of wger Workout Manager . + * Copyright (C) 2020, 2021 wger Team + * + * wger Workout Manager is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * wger Workout Manager is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +import 'package:json_annotation/json_annotation.dart'; +import 'package:wger/helpers/json.dart'; + +part 'image.g.dart'; + +@JsonSerializable() +class Image { + @JsonKey(required: true) + final int id; + + @JsonKey(required: true, toJson: toDate) + late DateTime date; + + @JsonKey(required: true, name: 'image') + final String url; + + @JsonKey(defaultValue: '') + final String description; + + Image({ + required this.id, + required this.date, + required this.url, + required this.description, + }); + + // Boilerplate + factory Image.fromJson(Map json) => _$ImageFromJson(json); + Map toJson() => _$ImageToJson(this); +} diff --git a/lib/models/gallery/image.g.dart b/lib/models/gallery/image.g.dart new file mode 100644 index 00000000..c6894bdd --- /dev/null +++ b/lib/models/gallery/image.g.dart @@ -0,0 +1,24 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'image.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +Image _$ImageFromJson(Map json) { + $checkKeys(json, requiredKeys: const ['id', 'date', 'image']); + return Image( + id: json['id'] as int, + date: DateTime.parse(json['date'] as String), + url: json['image'] as String, + description: json['description'] as String? ?? '', + ); +} + +Map _$ImageToJson(Image instance) => { + 'id': instance.id, + 'date': toDate(instance.date), + 'image': instance.url, + 'description': instance.description, + }; diff --git a/lib/providers/workout_plans.dart b/lib/providers/workout_plans.dart index 626db205..1ff80202 100644 --- a/lib/providers/workout_plans.dart +++ b/lib/providers/workout_plans.dart @@ -24,6 +24,7 @@ import 'package:http/http.dart' as http; import 'package:shared_preferences/shared_preferences.dart'; import 'package:wger/helpers/consts.dart'; import 'package:wger/models/exercises/exercise.dart'; +import 'package:wger/models/gallery/image.dart' as gallery; import 'package:wger/models/http_exception.dart'; import 'package:wger/models/workouts/day.dart'; import 'package:wger/models/workouts/log.dart'; @@ -44,6 +45,7 @@ class WorkoutPlans extends WgerBaseProvider with ChangeNotifier { static const _settingsUrlPath = 'setting'; static const _logsUrlPath = 'workoutlog'; static const _sessionUrlPath = 'workoutsession'; + static const _galleryUrlPath = 'gallery'; static const _weightUnitUrlPath = 'setting-weightunit'; static const _repetitionUnitUrlPath = 'setting-repetitionunit'; @@ -52,6 +54,7 @@ class WorkoutPlans extends WgerBaseProvider with ChangeNotifier { List _workoutPlans = []; List _weightUnits = []; List _repetitionUnit = []; + List images = []; WorkoutPlans(Auth auth, Exercises exercises, List entries, [http.Client? client]) : this._exercises = exercises, @@ -422,4 +425,29 @@ class WorkoutPlans extends WgerBaseProvider with ChangeNotifier { notifyListeners(); return newLog; } + + /* + * Gallery + */ + + Future fetchAndSetGallery() async { + final data = await fetch(makeUrl(_galleryUrlPath)); + + data['results'].forEach((e) { + gallery.Image image = gallery.Image.fromJson(e); + images.add(image); + }); + + notifyListeners(); + } + + Future addImage(gallery.Image image) async { + final data = await post(image.toJson(), makeUrl(_galleryUrlPath)); + final newImage = gallery.Image.fromJson(data); + + images.add(newImage); + + notifyListeners(); + return newImage; + } } diff --git a/lib/screens/dashboard.dart b/lib/screens/dashboard.dart index 97cd4b98..793de85a 100644 --- a/lib/screens/dashboard.dart +++ b/lib/screens/dashboard.dart @@ -59,6 +59,8 @@ class _DashboardScreenState extends State { if (!Provider.of(context, listen: false).dataInit) { Provider.of(context, listen: false).setServerVersion(); + await Provider.of(context, listen: false).fetchAndSetGallery(); + // Base data await Future.wait([ Provider.of(context, listen: false).fetchAndSetUnits(), diff --git a/lib/screens/gallery_screen.dart b/lib/screens/gallery_screen.dart new file mode 100644 index 00000000..449eb369 --- /dev/null +++ b/lib/screens/gallery_screen.dart @@ -0,0 +1,60 @@ +/* + * This file is part of wger Workout Manager . + * Copyright (C) 2020, 2021 wger Team + * + * wger Workout Manager is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * wger Workout Manager is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_gen/gen_l10n/app_localizations.dart'; +import 'package:provider/provider.dart'; +import 'package:wger/models/workouts/workout_plan.dart'; +import 'package:wger/providers/workout_plans.dart'; +import 'package:wger/screens/form_screen.dart'; +import 'package:wger/widgets/app_drawer.dart'; +import 'package:wger/widgets/core/core.dart'; +import 'package:wger/widgets/gallery/overview.dart'; +import 'package:wger/widgets/workouts/forms.dart'; + +class GalleryScreen extends StatelessWidget { + static const routeName = '/gallery'; + const GalleryScreen(); + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: WgerAppBar( + AppLocalizations.of(context)!.labelWorkoutPlans, + ), + drawer: AppDrawer(), + floatingActionButton: FloatingActionButton( + child: const Icon(Icons.add), + onPressed: () { + Navigator.pushNamed( + context, + FormScreen.routeName, + arguments: FormScreenArguments( + AppLocalizations.of(context)!.newWorkout, + WorkoutForm(WorkoutPlan.empty()), + ), + ); + }, + ), + body: Consumer( + builder: (context, workoutProvider, child) => Gallery(), + ), + ); + } +} diff --git a/lib/screens/workout_plans_screen.dart b/lib/screens/workout_plans_screen.dart index 3edbe030..f6dda7f0 100644 --- a/lib/screens/workout_plans_screen.dart +++ b/lib/screens/workout_plans_screen.dart @@ -23,6 +23,7 @@ import 'package:provider/provider.dart'; import 'package:wger/models/workouts/workout_plan.dart'; import 'package:wger/providers/workout_plans.dart'; import 'package:wger/screens/form_screen.dart'; +import 'package:wger/screens/gallery_screen.dart'; import 'package:wger/widgets/app_drawer.dart'; import 'package:wger/widgets/core/core.dart'; import 'package:wger/widgets/workouts/forms.dart'; @@ -35,11 +36,40 @@ class WorkoutPlansScreen extends StatefulWidget { _WorkoutPlansScreenState createState() => _WorkoutPlansScreenState(); } +enum WorkoutListOptions { + gallery, +} + class _WorkoutPlansScreenState extends State { @override Widget build(BuildContext context) { return Scaffold( - appBar: WgerAppBar(AppLocalizations.of(context)!.labelWorkoutPlans), + appBar: WgerAppBar( + AppLocalizations.of(context)!.labelWorkoutPlans, + [ + PopupMenuButton( + icon: Icon(Icons.more_vert), + onSelected: (value) { + // Gallery + if (value == WorkoutListOptions.gallery) { + Navigator.pushNamed( + context, + GalleryScreen.routeName, + ); + } + }, + itemBuilder: (BuildContext context) { + return [ + PopupMenuItem( + value: WorkoutListOptions.gallery, + child: Text('Gallery'), + ), + const PopupMenuDivider(), + ]; + }, + ), + ], + ), drawer: AppDrawer(), floatingActionButton: FloatingActionButton( child: const Icon(Icons.add), diff --git a/lib/widgets/core/core.dart b/lib/widgets/core/core.dart index 7c1ca083..25fa49c9 100644 --- a/lib/widgets/core/core.dart +++ b/lib/widgets/core/core.dart @@ -46,13 +46,19 @@ class MutedText extends StatelessWidget { /// Appbar that extends [PreferredSizeWidget] class WgerAppBar extends StatelessWidget with PreferredSizeWidget { String _title; + late List _actions = []; - WgerAppBar(this._title); + WgerAppBar(this._title, [List? actions]) { + if (actions != null) { + _actions = actions; + } + } @override Widget build(BuildContext context) { return AppBar( title: Text(_title), + actions: _actions, ); } diff --git a/lib/widgets/gallery/overview.dart b/lib/widgets/gallery/overview.dart new file mode 100644 index 00000000..2c204430 --- /dev/null +++ b/lib/widgets/gallery/overview.dart @@ -0,0 +1,46 @@ +/* + * This file is part of wger Workout Manager . + * Copyright (C) 2020, 2021 wger Team + * + * wger Workout Manager is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * wger Workout Manager is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +import 'package:flutter/widgets.dart'; +import 'package:provider/provider.dart'; +import 'package:wger/providers/workout_plans.dart'; + +class Gallery extends StatelessWidget { + const Gallery(); + + @override + Widget build(BuildContext context) { + final provider = Provider.of(context, listen: false); + + return Padding( + padding: const EdgeInsets.all(5), + child: GridView.count( + crossAxisCount: 2, + mainAxisSpacing: 5, + crossAxisSpacing: 5, + children: List.generate(provider.images.length, (index) { + return FadeInImage( + placeholder: AssetImage('assets/images/placeholder.png'), + image: NetworkImage(provider.images[index].url), + fit: BoxFit.cover, + ); + }), + ), + ); + } +} diff --git a/test/workout_form_test.mocks.dart b/test/workout_form_test.mocks.dart index 5cbc242d..508dcfda 100644 --- a/test/workout_form_test.mocks.dart +++ b/test/workout_form_test.mocks.dart @@ -2,13 +2,14 @@ // in wger/test/workout_form_test.dart. // Do not manually edit this file. -import 'dart:async' as _i14; -import 'dart:ui' as _i16; +import 'dart:async' as _i15; +import 'dart:ui' as _i17; import 'package:http/src/client.dart' as _i5; -import 'package:http/src/response.dart' as _i12; +import 'package:http/src/response.dart' as _i13; import 'package:mockito/mockito.dart' as _i1; -import 'package:wger/models/exercises/exercise.dart' as _i15; +import 'package:wger/models/exercises/exercise.dart' as _i16; +import 'package:wger/models/gallery/image.dart' as _i12; import 'package:wger/models/workouts/day.dart' as _i7; import 'package:wger/models/workouts/log.dart' as _i11; import 'package:wger/models/workouts/repetition_unit.dart' as _i3; @@ -18,7 +19,7 @@ import 'package:wger/models/workouts/setting.dart' as _i9; import 'package:wger/models/workouts/weight_unit.dart' as _i2; import 'package:wger/models/workouts/workout_plan.dart' as _i6; import 'package:wger/providers/auth.dart' as _i4; -import 'package:wger/providers/workout_plans.dart' as _i13; +import 'package:wger/providers/workout_plans.dart' as _i14; // ignore_for_file: comment_references // ignore_for_file: unnecessary_parenthesis @@ -47,12 +48,14 @@ class _FakeWorkoutSession extends _i1.Fake implements _i10.WorkoutSession {} class _FakeLog extends _i1.Fake implements _i11.Log {} -class _FakeResponse extends _i1.Fake implements _i12.Response {} +class _FakeImage extends _i1.Fake implements _i12.Image {} + +class _FakeResponse extends _i1.Fake implements _i13.Response {} /// A class which mocks [WorkoutPlans]. /// /// See the documentation for Mockito's code generation for more information. -class MockWorkoutPlans extends _i1.Mock implements _i13.WorkoutPlans { +class MockWorkoutPlans extends _i1.Mock implements _i14.WorkoutPlans { MockWorkoutPlans() { _i1.throwOnMissingStub(this); } @@ -113,108 +116,118 @@ class MockWorkoutPlans extends _i1.Mock implements _i13.WorkoutPlans { super.noSuchMethod(Invocation.method(#resetCurrentPlan, []), returnValueForMissingStub: null); @override - _i14.Future fetchAndSetAllPlans() => + _i15.Future fetchAndSetAllPlans() => (super.noSuchMethod(Invocation.method(#fetchAndSetAllPlans, []), returnValue: Future.value(null), - returnValueForMissingStub: Future.value()) as _i14.Future); + returnValueForMissingStub: Future.value()) as _i15.Future); @override - _i14.Future fetchAndSetWorkoutPlan(int? workoutId) => (super + _i15.Future fetchAndSetWorkoutPlan(int? workoutId) => (super .noSuchMethod(Invocation.method(#fetchAndSetWorkoutPlan, [workoutId]), returnValue: Future.value(null), - returnValueForMissingStub: Future.value()) as _i14.Future); + returnValueForMissingStub: Future.value()) as _i15.Future); @override - _i14.Future<_i6.WorkoutPlan> addWorkout(_i6.WorkoutPlan? workout) => + _i15.Future<_i6.WorkoutPlan> addWorkout(_i6.WorkoutPlan? workout) => (super.noSuchMethod(Invocation.method(#addWorkout, [workout]), returnValue: Future<_i6.WorkoutPlan>.value(_FakeWorkoutPlan())) - as _i14.Future<_i6.WorkoutPlan>); + as _i15.Future<_i6.WorkoutPlan>); @override - _i14.Future editWorkout(_i6.WorkoutPlan? workout) => + _i15.Future editWorkout(_i6.WorkoutPlan? workout) => (super.noSuchMethod(Invocation.method(#editWorkout, [workout]), returnValue: Future.value(null), - returnValueForMissingStub: Future.value()) as _i14.Future); + returnValueForMissingStub: Future.value()) as _i15.Future); @override - _i14.Future deleteWorkout(int? id) => + _i15.Future deleteWorkout(int? id) => (super.noSuchMethod(Invocation.method(#deleteWorkout, [id]), returnValue: Future.value(null), - returnValueForMissingStub: Future.value()) as _i14.Future); + returnValueForMissingStub: Future.value()) as _i15.Future); @override - _i14.Future> fetchLogData( - _i6.WorkoutPlan? workout, _i15.Exercise? exercise) => + _i15.Future> fetchLogData( + _i6.WorkoutPlan? workout, _i16.Exercise? exercise) => (super.noSuchMethod(Invocation.method(#fetchLogData, [workout, exercise]), returnValue: Future>.value({})) - as _i14.Future>); + as _i15.Future>); @override - _i14.Future fetchAndSetRepetitionUnits() => + _i15.Future fetchAndSetRepetitionUnits() => (super.noSuchMethod(Invocation.method(#fetchAndSetRepetitionUnits, []), returnValue: Future.value(null), - returnValueForMissingStub: Future.value()) as _i14.Future); + returnValueForMissingStub: Future.value()) as _i15.Future); @override - _i14.Future fetchAndSetWeightUnits() => + _i15.Future fetchAndSetWeightUnits() => (super.noSuchMethod(Invocation.method(#fetchAndSetWeightUnits, []), returnValue: Future.value(null), - returnValueForMissingStub: Future.value()) as _i14.Future); + returnValueForMissingStub: Future.value()) as _i15.Future); @override - _i14.Future fetchAndSetUnits() => + _i15.Future fetchAndSetUnits() => (super.noSuchMethod(Invocation.method(#fetchAndSetUnits, []), returnValue: Future.value(null), - returnValueForMissingStub: Future.value()) as _i14.Future); + returnValueForMissingStub: Future.value()) as _i15.Future); @override - _i14.Future<_i7.Day> addDay(_i7.Day? day, _i6.WorkoutPlan? workout) => + _i15.Future<_i7.Day> addDay(_i7.Day? day, _i6.WorkoutPlan? workout) => (super.noSuchMethod(Invocation.method(#addDay, [day, workout]), returnValue: Future<_i7.Day>.value(_FakeDay())) - as _i14.Future<_i7.Day>); + as _i15.Future<_i7.Day>); @override - _i14.Future deleteDay(_i7.Day? day) => + _i15.Future deleteDay(_i7.Day? day) => (super.noSuchMethod(Invocation.method(#deleteDay, [day]), returnValue: Future.value(null), - returnValueForMissingStub: Future.value()) as _i14.Future); + returnValueForMissingStub: Future.value()) as _i15.Future); @override - _i14.Future<_i8.Set> addSet(_i8.Set? workoutSet) => (super.noSuchMethod( + _i15.Future<_i8.Set> addSet(_i8.Set? workoutSet) => (super.noSuchMethod( Invocation.method(#addSet, [workoutSet]), - returnValue: Future<_i8.Set>.value(_FakeSet())) as _i14.Future<_i8.Set>); + returnValue: Future<_i8.Set>.value(_FakeSet())) as _i15.Future<_i8.Set>); @override - _i14.Future fetchComputedSettings(_i8.Set? workoutSet) => (super + _i15.Future fetchComputedSettings(_i8.Set? workoutSet) => (super .noSuchMethod(Invocation.method(#fetchComputedSettings, [workoutSet]), returnValue: Future.value(null), - returnValueForMissingStub: Future.value()) as _i14.Future); + returnValueForMissingStub: Future.value()) as _i15.Future); @override - _i14.Future fetchSmartText( - _i8.Set? workoutSet, _i15.Exercise? exercise) => + _i15.Future fetchSmartText( + _i8.Set? workoutSet, _i16.Exercise? exercise) => (super.noSuchMethod( Invocation.method(#fetchSmartText, [workoutSet, exercise]), - returnValue: Future.value('')) as _i14.Future); + returnValue: Future.value('')) as _i15.Future); @override - _i14.Future deleteSet(_i8.Set? workoutSet) => + _i15.Future deleteSet(_i8.Set? workoutSet) => (super.noSuchMethod(Invocation.method(#deleteSet, [workoutSet]), returnValue: Future.value(null), - returnValueForMissingStub: Future.value()) as _i14.Future); + returnValueForMissingStub: Future.value()) as _i15.Future); @override - _i14.Future<_i9.Setting> addSetting(_i9.Setting? workoutSetting) => + _i15.Future<_i9.Setting> addSetting(_i9.Setting? workoutSetting) => (super.noSuchMethod(Invocation.method(#addSetting, [workoutSetting]), returnValue: Future<_i9.Setting>.value(_FakeSetting())) - as _i14.Future<_i9.Setting>); + as _i15.Future<_i9.Setting>); @override - _i14.Future fetchSessionData() => + _i15.Future fetchSessionData() => (super.noSuchMethod(Invocation.method(#fetchSessionData, []), - returnValue: Future.value(null)) as _i14.Future); + returnValue: Future.value(null)) as _i15.Future); @override - _i14.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session) => + _i15.Future<_i10.WorkoutSession> addSession(_i10.WorkoutSession? session) => (super.noSuchMethod(Invocation.method(#addSession, [session]), returnValue: Future<_i10.WorkoutSession>.value(_FakeWorkoutSession())) - as _i14.Future<_i10.WorkoutSession>); + as _i15.Future<_i10.WorkoutSession>); @override - _i14.Future<_i11.Log> addLog(_i11.Log? log) => + _i15.Future<_i11.Log> addLog(_i11.Log? log) => (super.noSuchMethod(Invocation.method(#addLog, [log]), returnValue: Future<_i11.Log>.value(_FakeLog())) - as _i14.Future<_i11.Log>); + as _i15.Future<_i11.Log>); @override - void addListener(_i16.VoidCallback? listener) => + _i15.Future fetchAndSetGallery() => + (super.noSuchMethod(Invocation.method(#fetchAndSetGallery, []), + returnValue: Future.value(null), + returnValueForMissingStub: Future.value()) as _i15.Future); + @override + _i15.Future<_i12.Image> addImage(_i12.Image? image) => + (super.noSuchMethod(Invocation.method(#addImage, [image]), + returnValue: Future<_i12.Image>.value(_FakeImage())) + as _i15.Future<_i12.Image>); + @override + void addListener(_i17.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#addListener, [listener]), returnValueForMissingStub: null); @override - void removeListener(_i16.VoidCallback? listener) => + void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod(Invocation.method(#removeListener, [listener]), returnValueForMissingStub: null); @override @@ -230,27 +243,27 @@ class MockWorkoutPlans extends _i1.Mock implements _i13.WorkoutPlans { super.noSuchMethod(Invocation.method(#makeUrl, [path], {#id: id, #objectMethod: objectMethod, #query: query})); @override - _i14.Future> fetch(Uri? uri) => (super.noSuchMethod( + _i15.Future> fetch(Uri? uri) => (super.noSuchMethod( Invocation.method(#fetch, [uri]), returnValue: Future>.value({})) - as _i14.Future>); + as _i15.Future>); @override - _i14.Future> post( + _i15.Future> post( Map? data, Uri? uri) => (super.noSuchMethod(Invocation.method(#post, [data, uri]), returnValue: Future>.value({})) - as _i14.Future>); + as _i15.Future>); @override - _i14.Future> patch( + _i15.Future> patch( Map? data, Uri? uri) => (super.noSuchMethod(Invocation.method(#patch, [data, uri]), returnValue: Future>.value({})) - as _i14.Future>); + as _i15.Future>); @override - _i14.Future<_i12.Response> deleteRequest(String? url, int? id) => + _i15.Future<_i13.Response> deleteRequest(String? url, int? id) => (super.noSuchMethod(Invocation.method(#deleteRequest, [url, id]), - returnValue: Future<_i12.Response>.value(_FakeResponse())) - as _i14.Future<_i12.Response>); + returnValue: Future<_i13.Response>.value(_FakeResponse())) + as _i15.Future<_i13.Response>); }