near final
This commit is contained in:
@@ -2,15 +2,32 @@ import 'dart:io';
|
||||
|
||||
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:bus_infotainment/backend/live_information.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:window_manager/window_manager.dart';
|
||||
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
if (defaultTargetPlatform == TargetPlatform.windows && !kIsWeb) {
|
||||
await windowManager.ensureInitialized();
|
||||
|
||||
WindowOptions options = WindowOptions(
|
||||
size: Size(411.4, 850.3),
|
||||
);
|
||||
|
||||
windowManager.setAspectRatio(411.4 / 850.3);
|
||||
|
||||
await windowManager.waitUntilReadyToShow(options, () async {
|
||||
await windowManager.show();
|
||||
await windowManager.focus();
|
||||
});
|
||||
}
|
||||
|
||||
LiveInformation liveInformation = LiveInformation();
|
||||
await liveInformation.Initialize();
|
||||
await liveInformation.initialize();
|
||||
|
||||
// Disalow screen to turn off on android
|
||||
await SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky);
|
||||
@@ -30,6 +47,10 @@ class MyApp extends StatelessWidget {
|
||||
// This widget is the root of your application.
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
// Permission.location.onGrantedCallback(() => null).request();
|
||||
|
||||
print("Window size: ${MediaQuery.of(context).size}");
|
||||
return MaterialApp(
|
||||
title: 'Flutter Demo',
|
||||
theme: ThemeData(
|
||||
|
||||
Reference in New Issue
Block a user