79 lines
2.3 KiB
Dart
79 lines
2.3 KiB
Dart
|
|
|
|
|
|
import 'package:bus_infotainment/pages/tfl_dataset_test.dart';
|
|
import 'package:bus_infotainment/remaster/DashboardArc.dart';
|
|
import 'package:bus_infotainment/remaster/InitialStartup.dart';
|
|
import 'package:bus_infotainment/remaster/SearchArc.dart';
|
|
import 'package:bus_infotainment/remaster/dashboard.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter/services.dart';
|
|
import 'package:shadcn_ui/shadcn_ui.dart';
|
|
import 'package:window_manager/window_manager.dart';
|
|
|
|
import 'WebSocketTest.dart';
|
|
|
|
class RemasteredApp extends StatelessWidget {
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
|
|
// Force landscape mode
|
|
SystemChrome.setPreferredOrientations([
|
|
DeviceOrientation.landscapeLeft,
|
|
DeviceOrientation.landscapeRight,
|
|
]);
|
|
|
|
// Hide navigation bar and status bar
|
|
SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive, overlays: [
|
|
SystemUiOverlay.bottom,
|
|
SystemUiOverlay.top,
|
|
]);
|
|
|
|
// Hide the gesture navigation bar
|
|
SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky, overlays: [
|
|
SystemUiOverlay.bottom,
|
|
SystemUiOverlay.top,
|
|
]);
|
|
|
|
|
|
|
|
return ShadApp(
|
|
darkTheme: ShadThemeData(
|
|
brightness: Brightness.dark,
|
|
colorScheme: ShadSlateColorScheme.dark(
|
|
background: Colors.grey.shade900,
|
|
primary: Colors.grey.shade50,
|
|
primaryForeground: Colors.grey.shade900,
|
|
border: Colors.grey.shade400,
|
|
input: Colors.grey.shade400,
|
|
),
|
|
),
|
|
themeMode: ThemeMode.dark,
|
|
|
|
// remove debug banner
|
|
debugShowCheckedModeBanner: false,
|
|
|
|
routes: {
|
|
'/setup': (context) => InitialStartup(),
|
|
'/': (context) => HomePage_Re(),
|
|
|
|
'/routes': (context) => SearchArc(),
|
|
'/multi/routes': (context) => RoutePage(),
|
|
|
|
'/enroute': (context) => ArcDashboard(),
|
|
'/legacy': (context) => TfL_Dataset_Test(),
|
|
'/multi': (context) => MultiModeSetup(),
|
|
'/multi/enroute': (context) => ArcDashboard(),
|
|
'/multi/login': (context) => MultiModeLogin(),
|
|
'/multi/register': (context) => MultiModeRegister(),
|
|
'/display': (context) => FullscreenDisplay(),
|
|
'/multi/join': (context) => MultiModeJoin(),
|
|
'/websocket': (context) => WebSocketWidget(),
|
|
|
|
},
|
|
|
|
);
|
|
}
|
|
|
|
} |