Add config options
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import 'package:hiddify/utils/pref_notifier.dart';
|
||||
|
||||
final silentStartProvider = PrefNotifier.provider("silent_start", false);
|
||||
|
||||
final debugModeProvider = PrefNotifier.provider("debug_mode", false);
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
import 'package:hiddify/domain/constants.dart';
|
||||
import 'package:hiddify/utils/pref_notifier.dart';
|
||||
|
||||
final connectionTestUrlProvider =
|
||||
PrefNotifier.provider("connection_test_url", Defaults.connectionTestUrl);
|
||||
|
||||
final concurrentTestCountProvider = PrefNotifier.provider(
|
||||
"concurrent_test_count",
|
||||
Defaults.concurrentTestCount,
|
||||
);
|
||||
|
||||
final debugModeProvider = PrefNotifier.provider("debug_mode", false);
|
||||
@@ -1,2 +1 @@
|
||||
export 'general_prefs.dart';
|
||||
export 'misc_prefs.dart';
|
||||
|
||||
@@ -23,9 +23,9 @@ part 'desktop_routes.g.dart';
|
||||
TypedGoRoute<LogsRoute>(path: LogsRoute.path),
|
||||
TypedGoRoute<SettingsRoute>(
|
||||
path: SettingsRoute.path,
|
||||
// routes: [
|
||||
// TypedGoRoute<ClashOverridesRoute>(path: ClashOverridesRoute.path),
|
||||
// ],
|
||||
routes: [
|
||||
TypedGoRoute<ConfigOptionsRoute>(path: ConfigOptionsRoute.path),
|
||||
],
|
||||
),
|
||||
TypedGoRoute<AboutRoute>(path: AboutRoute.path),
|
||||
],
|
||||
@@ -59,18 +59,18 @@ class SettingsRoute extends GoRouteData {
|
||||
}
|
||||
}
|
||||
|
||||
// class ClashOverridesRoute extends GoRouteData {
|
||||
// const ClashOverridesRoute();
|
||||
// static const path = 'clash';
|
||||
class ConfigOptionsRoute extends GoRouteData {
|
||||
const ConfigOptionsRoute();
|
||||
static const path = 'config-options';
|
||||
|
||||
// @override
|
||||
// Page<void> buildPage(BuildContext context, GoRouterState state) {
|
||||
// return const MaterialPage(
|
||||
// fullscreenDialog: true,
|
||||
// child: ClashOverridesPage(),
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
@override
|
||||
Page<void> buildPage(BuildContext context, GoRouterState state) {
|
||||
return const MaterialPage(
|
||||
fullscreenDialog: true,
|
||||
child: ConfigOptionsPage(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class AboutRoute extends GoRouteData {
|
||||
const AboutRoute();
|
||||
|
||||
@@ -20,9 +20,9 @@ part 'mobile_routes.g.dart';
|
||||
TypedGoRoute<LogsRoute>(path: LogsRoute.path),
|
||||
TypedGoRoute<SettingsRoute>(
|
||||
path: SettingsRoute.path,
|
||||
// routes: [
|
||||
// TypedGoRoute<ClashOverridesRoute>(path: ClashOverridesRoute.path),
|
||||
// ],
|
||||
routes: [
|
||||
TypedGoRoute<ConfigOptionsRoute>(path: ConfigOptionsRoute.path),
|
||||
],
|
||||
),
|
||||
TypedGoRoute<AboutRoute>(path: AboutRoute.path),
|
||||
],
|
||||
@@ -69,20 +69,20 @@ class SettingsRoute extends GoRouteData {
|
||||
}
|
||||
}
|
||||
|
||||
// class ClashOverridesRoute extends GoRouteData {
|
||||
// const ClashOverridesRoute();
|
||||
// static const path = 'clash';
|
||||
class ConfigOptionsRoute extends GoRouteData {
|
||||
const ConfigOptionsRoute();
|
||||
static const path = 'config-options';
|
||||
|
||||
// static final GlobalKey<NavigatorState> $parentNavigatorKey = rootNavigatorKey;
|
||||
static final GlobalKey<NavigatorState> $parentNavigatorKey = rootNavigatorKey;
|
||||
|
||||
// @override
|
||||
// Page<void> buildPage(BuildContext context, GoRouterState state) {
|
||||
// return const MaterialPage(
|
||||
// fullscreenDialog: true,
|
||||
// child: ClashOverridesPage(),
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
@override
|
||||
Page<void> buildPage(BuildContext context, GoRouterState state) {
|
||||
return const MaterialPage(
|
||||
fullscreenDialog: true,
|
||||
child: ConfigOptionsPage(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class AboutRoute extends GoRouteData {
|
||||
const AboutRoute();
|
||||
|
||||
Reference in New Issue
Block a user