main.dart 994 B

1234567891011121314151617181920212223242526272829303132333435
  1. import 'package:flutter/material.dart';
  2. import 'dart:io';
  3. import 'package:flutter/services.dart';
  4. import 'package:shuqi/index_page.dart';
  5. import 'package:shuqi/model/constant.dart';
  6. import 'package:shuqi/model/sq_color.dart';
  7. void main() {
  8. runApp(MyApp());
  9. // 状态栏透明
  10. if (Platform.isAndroid) {
  11. SystemUiOverlayStyle systemUiOverlayStyle =
  12. SystemUiOverlayStyle(statusBarColor: Colors.transparent);
  13. SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle);
  14. }
  15. }
  16. class MyApp extends StatelessWidget {
  17. @override
  18. Widget build(BuildContext context) {
  19. return MaterialApp(
  20. title: '书旗小说',
  21. navigatorObservers: [routeObserver],
  22. debugShowCheckedModeBanner: false,
  23. theme: ThemeData(
  24. primaryColor: Colors.white,
  25. dividerColor: Color(0xffeeeeee),
  26. scaffoldBackgroundColor: SQColor.paper,
  27. textTheme: TextTheme(bodyLarge: TextStyle(color: SQColor.darkGray)),
  28. ),
  29. home: IndexPage(),
  30. );
  31. }
  32. }