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:
Roland Geider
2026-01-17 13:23:55 +01:00
parent 5574f74a2f
commit b81331609a
12 changed files with 735 additions and 134 deletions

View File

@@ -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]),