1234567891011121314151617181920212223242526272829303132333435 |
- import 'package:flutter/material.dart';
- import 'dart:io';
- import 'package:flutter/services.dart';
- import 'package:shuqi/index_page.dart';
- import 'package:shuqi/model/constant.dart';
- import 'package:shuqi/model/sq_color.dart';
- void main() {
- WidgetsFlutterBinding.ensureInitialized();
- runApp(MyApp());
- // 状态栏透明
- if (Platform.isAndroid) {
- SystemUiOverlayStyle systemUiOverlayStyle =
- SystemUiOverlayStyle(statusBarColor: Colors.transparent);
- SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle);
- }
- }
- class MyApp extends StatelessWidget {
- @override
- Widget build(BuildContext context) {
- return MaterialApp(
- title: '书旗小说',
- navigatorObservers: [routeObserver],
- debugShowCheckedModeBanner: false,
- theme: ThemeData(
- primaryColor: Colors.white,
- dividerColor: Color(0xffeeeeee),
- scaffoldBackgroundColor: SQColor.paper,
- textTheme: TextTheme(bodyLarge: TextStyle(color: SQColor.darkGray)),
- ),
- home: IndexPage(),
- );
- }
- }
|