Skip to content

Commit

Permalink
chore: Remove useless GoRouter routes
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
klochowicz committed Aug 21, 2023
1 parent a7c5a98 commit eb3dbf6
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 32 deletions.
2 changes: 0 additions & 2 deletions mobile/lib/common/settings_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions mobile/lib/common/status_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
29 changes: 1 addition & 28 deletions mobile/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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<NavigatorState> _rootNavigatorKey = GlobalKey<NavigatorState>(debugLabel: 'root');
final GlobalKey<NavigatorState> _shellNavigatorKey = GlobalKey<NavigatorState>(debugLabel: 'shell');
Expand Down Expand Up @@ -176,39 +174,14 @@ class _TenTenOneAppState extends State<TenTenOneApp> {
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(
path: TradeScreen.route,
builder: (BuildContext context, GoRouterState state) {
return const TradeScreen();
},
routes: <RouteBase>[
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 [],
),
],
),
Expand Down

0 comments on commit eb3dbf6

Please sign in to comment.