create dedicated log screen
This commit is contained in:
@@ -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';
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user