Update main.dart
This commit is contained in:
parent
4d569eda52
commit
736720f681
1 changed files with 9 additions and 0 deletions
|
|
@ -4,6 +4,7 @@ import 'package:bus_infotainment/pages/audio_cache_test.dart';
|
|||
import 'package:bus_infotainment/pages/tfl_dataset_test.dart';
|
||||
import 'package:bus_infotainment/singletons/live_information.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
|
|
@ -11,6 +12,14 @@ void main() async {
|
|||
LiveInformation liveInformation = LiveInformation();
|
||||
await liveInformation.Initialize();
|
||||
|
||||
// Disalow screen to turn off on android
|
||||
await SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky);
|
||||
// Disalow landscape mode
|
||||
await SystemChrome.setPreferredOrientations([
|
||||
DeviceOrientation.portraitUp,
|
||||
DeviceOrientation.portraitDown,
|
||||
]);
|
||||
|
||||
runApp(const MyApp());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue