dedicated screen for tor countries

This commit is contained in:
Fabian Freund
2026-02-16 07:29:12 +01:00
parent c8d46ad0c2
commit 8758fe821c
5 changed files with 262 additions and 121 deletions
+25 -1
View File
@@ -19,7 +19,16 @@
*/
part of 'routes.dart';
@TypedGoRoute<TorProxyRoute>(name: 'TorProxyRoute', path: '/tor')
@TypedGoRoute<TorProxyRoute>(
name: 'TorProxyRoute',
path: '/tor',
routes: [
TypedGoRoute<TorCountryPickerRoute>(
name: 'TorCountryPickerRoute',
path: 'country_picker',
),
],
)
class TorProxyRoute extends GoRouteData with $TorProxyRoute {
const TorProxyRoute();
@@ -28,3 +37,18 @@ class TorProxyRoute extends GoRouteData with $TorProxyRoute {
return const TorProxyScreen();
}
}
class TorCountryPickerRoute extends GoRouteData with $TorCountryPickerRoute {
final String title;
final String? $extra;
const TorCountryPickerRoute({required this.title, this.$extra});
@override
Widget build(BuildContext context, GoRouterState state) {
return CountryPickerScreen(
title: title,
selectedCountryCode: $extra,
);
}
}