Skip to content

Commit

Permalink
Cleanup old pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Codel1417 committed Feb 24, 2024
1 parent 855d340 commit 9bb9e5c
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 259 deletions.
39 changes: 20 additions & 19 deletions lib/Frontend/GoRouterConfig.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ final GoRouter router = GoRouter(
routes: [
ShellRoute(
navigatorKey: _shellNavigatorKey,
parentNavigatorKey: _rootNavigatorKey,
observers: [SentryNavigatorObserver(), CustomNavObserver(plausible)],
routes: [
GoRoute(
Expand All @@ -36,25 +37,6 @@ final GoRouter router = GoRouter(
name: 'Actions',
),
),
GoRoute(
name: 'OTA',
path: '/ota',
parentNavigatorKey: _rootNavigatorKey,
pageBuilder: (BuildContext context, GoRouterState state) {
String device = state.extra! as String;
return MaterialPage(
child: OtaUpdate(device: device),
key: state.pageKey,
name: 'OTA',
);
},
redirect: (context, state) {
if (state.extra == null) {
return '/';
}
return null;
},
),
GoRoute(
name: 'Triggers',
path: '/triggers',
Expand Down Expand Up @@ -135,5 +117,24 @@ final GoRouter router = GoRouter(
},
),
),
GoRoute(
name: 'OTA',
path: '/ota',
parentNavigatorKey: _rootNavigatorKey,
pageBuilder: (BuildContext context, GoRouterState state) {
String device = state.extra! as String;
return MaterialPage(
child: OtaUpdate(device: device),
key: state.pageKey,
name: 'OTA',
);
},
redirect: (context, state) {
if (state.extra == null) {
return '/';
}
return null;
},
),
],
);
17 changes: 0 additions & 17 deletions lib/Frontend/Widgets/manage_devices.dart

This file was deleted.

184 changes: 0 additions & 184 deletions lib/Frontend/Widgets/manage_known_devices.dart

This file was deleted.

31 changes: 10 additions & 21 deletions lib/Frontend/pages/Shell.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:animate_do/animate_do.dart';
import 'package:double_back_to_close_app/double_back_to_close_app.dart';
import 'package:flutter/material.dart';
import 'package:flutter_adaptive_scaffold/flutter_adaptive_scaffold.dart';
import 'package:flutter_reactive_ble/flutter_reactive_ble.dart';
Expand Down Expand Up @@ -111,28 +110,18 @@ class _NavigationDrawerExampleState extends ConsumerState<NavigationDrawerExampl
);
},
).toList(),
body: (_) => DoubleBackToCloseApp(
snackBar: SnackBar(
content: Text(doubleBack()),
),
child: SafeArea(
bottom: false,
top: false,
child: SnackBarOverlay(
child: widget.child,
),
body: (_) => SafeArea(
bottom: false,
top: false,
child: SnackBarOverlay(
child: widget.child,
),
),
smallBody: (_) => DoubleBackToCloseApp(
snackBar: SnackBar(
content: Text(doubleBack()),
),
child: SafeArea(
bottom: false,
top: false,
child: SnackBarOverlay(
child: widget.child,
),
smallBody: (_) => SafeArea(
bottom: false,
top: false,
child: SnackBarOverlay(
child: widget.child,
),
),
// Define a default secondaryBody.
Expand Down
16 changes: 0 additions & 16 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -297,14 +297,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "5.4.1"
double_back_to_close_app:
dependency: "direct main"
description:
name: double_back_to_close_app
sha256: d19ce4e2f8d2cb9f35bdbc90eecd5c731cc0e6216f5e8f14e7d1e076dafb344a
url: "https://pub.dev"
source: hosted
version: "2.1.0"
fake_async:
dependency: transitive
description:
Expand Down Expand Up @@ -1213,14 +1205,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.4"
simple_circular_progress_bar:
dependency: "direct main"
description:
name: simple_circular_progress_bar
sha256: e661ca942fbc617298e975b41fde19003d995de73ca6c2a1526c54d52f07151b
url: "https://pub.dev"
source: hosted
version: "1.0.2"
sky_engine:
dependency: transitive
description: flutter
Expand Down
2 changes: 0 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ dependencies:
logging_flutter: ^3.0.0
flutter_reactive_ble: ^5.3.1
go_router: ^13.2.0
double_back_to_close_app: ^2.1.0
pedometer: ^4.0.1
proximity_sensor: ^1.0.4
simple_circular_progress_bar: ^1.0.2
shake: ^2.2.0
flex_color_scheme: ^7.3.1
flutter_joystick: ^0.0.4
Expand Down

0 comments on commit 9bb9e5c

Please sign in to comment.