From eb3dbf6bbb76cc5b39ab35f6505fa012d8ba873f Mon Sep 17 00:00:00 2001 From: Mariusz Klochowicz Date: Fri, 18 Aug 2023 16:53:49 -0700 Subject: [PATCH] chore: Remove useless GoRouter routes As Settings and Status screens are not managed by GoRouter anymore, I'm not sure whether they'll be picked up by Firebase analytics (feedback seems to still work, so it might be OK). --- mobile/lib/common/settings_screen.dart | 2 -- mobile/lib/common/status_screen.dart | 2 -- mobile/lib/main.dart | 29 +------------------------- 3 files changed, 1 insertion(+), 32 deletions(-) diff --git a/mobile/lib/common/settings_screen.dart b/mobile/lib/common/settings_screen.dart index 750e0f260..d1fbd0753 100644 --- a/mobile/lib/common/settings_screen.dart +++ b/mobile/lib/common/settings_screen.dart @@ -15,8 +15,6 @@ import 'package:package_info_plus/package_info_plus.dart'; import 'package:get_10101/ffi.dart' as rust; class SettingsScreen extends StatefulWidget { - static const subRouteName = "settings"; - const SettingsScreen({super.key}); @override diff --git a/mobile/lib/common/status_screen.dart b/mobile/lib/common/status_screen.dart index e1534caf4..67d136b6f 100644 --- a/mobile/lib/common/status_screen.dart +++ b/mobile/lib/common/status_screen.dart @@ -7,8 +7,6 @@ import 'package:get_10101/common/value_data_row.dart'; import 'package:provider/provider.dart'; class StatusScreen extends StatefulWidget { - static const subRouteName = "status"; - const StatusScreen({super.key}); @override diff --git a/mobile/lib/main.dart b/mobile/lib/main.dart index 0b20cc8df..61f1f5aa8 100644 --- a/mobile/lib/main.dart +++ b/mobile/lib/main.dart @@ -5,7 +5,6 @@ import 'package:firebase_core/firebase_core.dart'; import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:flutter/material.dart'; -import 'package:get_10101/common/status_screen.dart'; import 'package:get_10101/firebase_options.dart'; import 'package:get_10101/common/channel_status_notifier.dart'; import 'dart:io'; @@ -56,7 +55,6 @@ import 'package:get_10101/features/trade/domain/price.dart'; import 'package:get_10101/features/wallet/domain/wallet_info.dart'; import 'package:get_10101/ffi.dart' as rust; import 'package:version/version.dart'; -import 'common/settings_screen.dart'; final GlobalKey _rootNavigatorKey = GlobalKey(debugLabel: 'root'); final GlobalKey _shellNavigatorKey = GlobalKey(debugLabel: 'shell'); @@ -176,18 +174,6 @@ class _TenTenOneAppState extends State { return const ScannerScreen(); }, ), - GoRoute( - path: SettingsScreen.subRouteName, - parentNavigatorKey: _rootNavigatorKey, - builder: (BuildContext context, GoRouterState state) { - return const SettingsScreen(); - }), - GoRoute( - path: StatusScreen.subRouteName, - parentNavigatorKey: _rootNavigatorKey, - builder: (BuildContext context, GoRouterState state) { - return const StatusScreen(); - }) ], ), GoRoute( @@ -195,20 +181,7 @@ class _TenTenOneAppState extends State { builder: (BuildContext context, GoRouterState state) { return const TradeScreen(); }, - routes: [ - GoRoute( - path: SettingsScreen.subRouteName, - parentNavigatorKey: _rootNavigatorKey, - builder: (BuildContext context, GoRouterState state) { - return const SettingsScreen(); - }), - GoRoute( - path: StatusScreen.subRouteName, - parentNavigatorKey: _rootNavigatorKey, - builder: (BuildContext context, GoRouterState state) { - return const StatusScreen(); - }) - ], + routes: const [], ), ], ),