added support for custom addon collections
This commit is contained in:
@@ -38,6 +38,7 @@ import 'package:weblibre/features/geckoview/features/tabs/presentation/screens/c
|
||||
import 'package:weblibre/features/geckoview/features/tabs/presentation/screens/container_list.dart';
|
||||
import 'package:weblibre/features/geckoview/features/tabs/presentation/screens/container_selection.dart';
|
||||
import 'package:weblibre/features/onboarding/presentation/onboarding.dart';
|
||||
import 'package:weblibre/features/settings/presentation/screens/addon_collection.dart';
|
||||
import 'package:weblibre/features/settings/presentation/screens/bang_settings.dart';
|
||||
import 'package:weblibre/features/settings/presentation/screens/developer_settings.dart';
|
||||
import 'package:weblibre/features/settings/presentation/screens/general_settings.dart';
|
||||
|
||||
@@ -112,6 +112,13 @@ RouteBase get $settingsRoute => GoRouteData.$route(
|
||||
path: 'developer',
|
||||
name: 'DeveloperSettingsRoute',
|
||||
factory: $DeveloperSettingsRoute._fromState,
|
||||
routes: [
|
||||
GoRouteData.$route(
|
||||
path: 'addon_collection',
|
||||
name: 'AddonCollectionRoute',
|
||||
factory: $AddonCollectionRoute._fromState,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
@@ -268,6 +275,28 @@ mixin $DeveloperSettingsRoute on GoRouteData {
|
||||
void replace(BuildContext context) => context.replace(location);
|
||||
}
|
||||
|
||||
mixin $AddonCollectionRoute on GoRouteData {
|
||||
static AddonCollectionRoute _fromState(GoRouterState state) =>
|
||||
AddonCollectionRoute();
|
||||
|
||||
@override
|
||||
String get location =>
|
||||
GoRouteData.$location('/settings/developer/addon_collection');
|
||||
|
||||
@override
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
@override
|
||||
Future<T?> push<T>(BuildContext context) => context.push<T>(location);
|
||||
|
||||
@override
|
||||
void pushReplacement(BuildContext context) =>
|
||||
context.pushReplacement(location);
|
||||
|
||||
@override
|
||||
void replace(BuildContext context) => context.replace(location);
|
||||
}
|
||||
|
||||
RouteBase get $browserRoute => GoRouteData.$route(
|
||||
path: '/',
|
||||
name: 'BrowserRoute',
|
||||
|
||||
@@ -47,6 +47,12 @@ part of 'routes.dart';
|
||||
TypedGoRoute<DeveloperSettingsRoute>(
|
||||
name: 'DeveloperSettingsRoute',
|
||||
path: 'developer',
|
||||
routes: [
|
||||
TypedGoRoute<AddonCollectionRoute>(
|
||||
name: 'AddonCollectionRoute',
|
||||
path: 'addon_collection',
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
)
|
||||
@@ -85,6 +91,13 @@ class DeveloperSettingsRoute extends GoRouteData with $DeveloperSettingsRoute {
|
||||
}
|
||||
}
|
||||
|
||||
class AddonCollectionRoute extends GoRouteData with $AddonCollectionRoute {
|
||||
@override
|
||||
Widget build(BuildContext context, GoRouterState state) {
|
||||
return const AddonCollectionScreen();
|
||||
}
|
||||
}
|
||||
|
||||
class WebEngineHardeningRoute extends GoRouteData
|
||||
with $WebEngineHardeningRoute {
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user