main.dart 764 B

1234567891011121314151617181920212223242526
  1. // @dart=2.9
  2. import 'dart:io';
  3. import 'package:flutter/gestures.dart';
  4. import 'package:flutter/material.dart';
  5. import 'package:flutter/services.dart';
  6. import 'package:sport/config.dart';
  7. import 'package:sport/config_inject.dart';
  8. import 'app.dart';
  9. void main() {
  10. WidgetsFlutterBinding.ensureInitialized();
  11. SystemChrome.setPreferredOrientations([
  12. DeviceOrientation.portraitUp,
  13. ]);
  14. ConfigInject()..inject(Config.ENV_RELEASE);
  15. runApp(MyApp());
  16. // debugPaintSizeEnabled = true; //打开视觉调试开关
  17. if (Platform.isAndroid) {
  18. // GestureBinding.instance.resamplingEnabled = true;
  19. //设置Android头部的导航栏透明
  20. SystemChrome.setSystemUIOverlayStyle(
  21. SystemUiOverlayStyle(statusBarColor: Colors.transparent));
  22. }
  23. }