mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-18 00:17:48 +01:00
Also allow changing the order of the dashboard widgets
This makes the behaviour more consistent and allows users to remove widgets they won't be using, like the trophies
This commit is contained in:
@@ -390,12 +390,12 @@ class MockUserProvider extends _i1.Mock implements _i17.UserProvider {
|
||||
as _i4.SharedPreferencesAsync);
|
||||
|
||||
@override
|
||||
Map<_i17.DashboardWidget, bool> get dashboardWidgetVisibility =>
|
||||
List<_i17.DashboardWidget> get dashboardOrder =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#dashboardWidgetVisibility),
|
||||
returnValue: <_i17.DashboardWidget, bool>{},
|
||||
Invocation.getter(#dashboardOrder),
|
||||
returnValue: <_i17.DashboardWidget>[],
|
||||
)
|
||||
as Map<_i17.DashboardWidget, bool>);
|
||||
as List<_i17.DashboardWidget>);
|
||||
|
||||
@override
|
||||
set themeMode(_i18.ThemeMode? value) => super.noSuchMethod(
|
||||
@@ -409,12 +409,6 @@ class MockUserProvider extends _i1.Mock implements _i17.UserProvider {
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
set dashboardWidgetVisibility(Map<_i17.DashboardWidget, bool>? value) => super.noSuchMethod(
|
||||
Invocation.setter(#dashboardWidgetVisibility, value),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
set profile(_i19.Profile? value) => super.noSuchMethod(
|
||||
Invocation.setter(#profile, value),
|
||||
@@ -451,6 +445,15 @@ class MockUserProvider extends _i1.Mock implements _i17.UserProvider {
|
||||
)
|
||||
as _i15.Future<void>);
|
||||
|
||||
@override
|
||||
_i15.Future<void> setDashboardOrder(int? oldIndex, int? newIndex) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setDashboardOrder, [oldIndex, newIndex]),
|
||||
returnValue: _i15.Future<void>.value(),
|
||||
returnValueForMissingStub: _i15.Future<void>.value(),
|
||||
)
|
||||
as _i15.Future<void>);
|
||||
|
||||
@override
|
||||
void setThemeMode(_i18.ThemeMode? mode) => super.noSuchMethod(
|
||||
Invocation.method(#setThemeMode, [mode]),
|
||||
|
||||
Reference in New Issue
Block a user