From b65a1383aeec9e1a6ad557a7025d03b52196df2b Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Sat, 26 Jun 2021 10:43:07 +0200 Subject: [PATCH] refactor: Move logs to about dialog --- lib/config/routes.dart | 7 ++++++- lib/utils/platform_infos.dart | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/config/routes.dart b/lib/config/routes.dart index 45d2b0dd..bf9bdaf6 100644 --- a/lib/config/routes.dart +++ b/lib/config/routes.dart @@ -199,6 +199,11 @@ class AppRoutes { widget: Login(), buildTransition: _fadeTransition, ), + VWidget( + path: 'logs', + widget: LogViewer(), + buildTransition: _dynamicTransition, + ), ], ), ]; @@ -284,7 +289,7 @@ class AppRoutes { ], ), VWidget( - path: '/logs', + path: 'logs', widget: LogViewer(), buildTransition: _dynamicTransition, ), diff --git a/lib/utils/platform_infos.dart b/lib/utils/platform_infos.dart index ef01bbb7..b465c6a9 100644 --- a/lib/utils/platform_infos.dart +++ b/lib/utils/platform_infos.dart @@ -6,6 +6,7 @@ import 'package:flutter/material.dart'; import 'package:package_info_plus/package_info_plus.dart'; import 'package:url_launcher/url_launcher.dart'; import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:vrouter/vrouter.dart'; import '../config/app_config.dart'; @@ -54,6 +55,10 @@ abstract class PlatformInfos { onPressed: () => launch(AppConfig.emojiFontUrl), child: Text(AppConfig.emojiFontName), ), + OutlinedButton( + onPressed: () => VRouter.of(context).push('logs'), + child: Text('Logs'), + ), SentrySwitchListTile(label: L10n.of(context).sendBugReports), ], applicationIcon: Image.asset('assets/logo.png', width: 64, height: 64),