create dedicated log screen

This commit is contained in:
Fabian Freund
2026-01-21 13:48:10 +01:00
parent bf068d5318
commit b573ed5645
6 changed files with 407 additions and 16 deletions
+1
View File
@@ -57,6 +57,7 @@ import 'package:weblibre/features/settings/presentation/screens/advanced_setting
import 'package:weblibre/features/settings/presentation/screens/appearance_display_settings.dart';
import 'package:weblibre/features/settings/presentation/screens/bang_settings.dart';
import 'package:weblibre/features/settings/presentation/screens/doh_settings.dart';
import 'package:weblibre/features/settings/presentation/screens/error_logs_screen.dart';
import 'package:weblibre/features/settings/presentation/screens/fingerprint_settings.dart';
import 'package:weblibre/features/settings/presentation/screens/fingerprinting_settings.dart';
import 'package:weblibre/features/settings/presentation/screens/locale_settings.dart';
+25
View File
@@ -151,6 +151,11 @@ RouteBase get $settingsRoute => GoRouteData.$route(
name: 'TrackingProtectionExceptionsRoute',
factory: $TrackingProtectionExceptionsRoute._fromState,
),
GoRouteData.$route(
path: 'error_logs',
name: 'ErrorLogsRoute',
factory: $ErrorLogsRoute._fromState,
),
],
);
@@ -473,6 +478,26 @@ mixin $TrackingProtectionExceptionsRoute on GoRouteData {
void replace(BuildContext context) => context.replace(location);
}
mixin $ErrorLogsRoute on GoRouteData {
static ErrorLogsRoute _fromState(GoRouterState state) => ErrorLogsRoute();
@override
String get location => GoRouteData.$location('/settings/error_logs');
@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: '/browser',
name: 'BrowserRoute',
@@ -75,6 +75,7 @@ part of 'routes.dart';
name: 'TrackingProtectionExceptionsRoute',
path: 'tracking_protection_exceptions',
),
TypedGoRoute<ErrorLogsRoute>(name: 'ErrorLogsRoute', path: 'error_logs'),
],
)
class SettingsRoute extends GoRouteData with $SettingsRoute {
@@ -194,3 +195,10 @@ class TrackingProtectionExceptionsRoute extends GoRouteData
return const TrackingProtectionExceptionsScreen();
}
}
class ErrorLogsRoute extends GoRouteData with $ErrorLogsRoute {
@override
Widget build(BuildContext context, GoRouterState state) {
return const ErrorLogsScreen();
}
}