|
@@ -1,5 +1,6 @@
|
|
|
import 'dart:io';
|
|
|
|
|
|
+import 'package:flutter/foundation.dart';
|
|
|
import 'package:flutter/material.dart';
|
|
|
import 'package:flutter/services.dart';
|
|
|
import 'package:flutter_chinese_chees/routes.dart';
|
|
@@ -9,7 +10,10 @@ import 'package:flutter_chinese_chees/routes.dart';
|
|
|
/// Author : liuyuqi.gov@msn.cn
|
|
|
void main() async {
|
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
|
-
|
|
|
+ if (!kIsWeb && (Platform.isMacOS || Platform.isWindows || Platform.isLinux)) {
|
|
|
+ await windowManager.ensureInitialized();
|
|
|
+ }
|
|
|
+
|
|
|
runApp(const MyApp());
|
|
|
|
|
|
if (Platform.isAndroid) {
|
|
@@ -25,7 +29,6 @@ class MyApp extends StatelessWidget {
|
|
|
// This widget is the root of your application.
|
|
|
@override
|
|
|
Widget build(BuildContext context) {
|
|
|
-
|
|
|
return MaterialApp(
|
|
|
title: '中国象棋',
|
|
|
debugShowCheckedModeBanner: false,
|