main_dev.dart 699 B

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