add doh settings
This commit is contained in:
@@ -42,6 +42,7 @@ 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/doh_settings.dart';
|
||||
import 'package:weblibre/features/settings/presentation/screens/general_settings.dart';
|
||||
import 'package:weblibre/features/settings/presentation/screens/settings.dart';
|
||||
import 'package:weblibre/features/settings/presentation/screens/web_engine_hardening.dart';
|
||||
|
||||
@@ -106,6 +106,11 @@ RouteBase get $settingsRoute => GoRouteData.$route(
|
||||
),
|
||||
],
|
||||
),
|
||||
GoRouteData.$route(
|
||||
path: 'doh',
|
||||
name: 'DohSettingsRoute',
|
||||
factory: $DohSettingsRoute._fromState,
|
||||
),
|
||||
],
|
||||
),
|
||||
GoRouteData.$route(
|
||||
@@ -254,6 +259,26 @@ mixin $WebEngineHardeningGroupRoute on GoRouteData {
|
||||
void replace(BuildContext context) => context.replace(location);
|
||||
}
|
||||
|
||||
mixin $DohSettingsRoute on GoRouteData {
|
||||
static DohSettingsRoute _fromState(GoRouterState state) => DohSettingsRoute();
|
||||
|
||||
@override
|
||||
String get location => GoRouteData.$location('/settings/web_engine/doh');
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
mixin $DeveloperSettingsRoute on GoRouteData {
|
||||
static DeveloperSettingsRoute _fromState(GoRouterState state) =>
|
||||
DeveloperSettingsRoute();
|
||||
|
||||
@@ -42,6 +42,7 @@ part of 'routes.dart';
|
||||
),
|
||||
],
|
||||
),
|
||||
TypedGoRoute<DohSettingsRoute>(name: 'DohSettingsRoute', path: 'doh'),
|
||||
],
|
||||
),
|
||||
TypedGoRoute<DeveloperSettingsRoute>(
|
||||
@@ -77,6 +78,13 @@ class BangSettingsRoute extends GoRouteData with $BangSettingsRoute {
|
||||
}
|
||||
}
|
||||
|
||||
class DohSettingsRoute extends GoRouteData with $DohSettingsRoute {
|
||||
@override
|
||||
Widget build(BuildContext context, GoRouterState state) {
|
||||
return const DohSettingsScreen();
|
||||
}
|
||||
}
|
||||
|
||||
class WebEngineSettingsRoute extends GoRouteData with $WebEngineSettingsRoute {
|
||||
@override
|
||||
Widget build(BuildContext context, GoRouterState state) {
|
||||
|
||||
Reference in New Issue
Block a user