init
This commit is contained in:
37
lib/main.dart
Normal file
37
lib/main.dart
Normal file
@ -0,0 +1,37 @@
|
||||
import 'package:fengshui_compass/utils/color.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
import 'package:fengshui_compass/bottom_navigation_widget.dart';
|
||||
|
||||
void main() {
|
||||
///屏幕刷新率和显示率不一致时的优化
|
||||
// GestureBinding.instance.resamplingEnabled = true;
|
||||
runApp(const MyApp());
|
||||
}
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key key}) : super(key: key);
|
||||
|
||||
// This widget is the root of your application.
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
title: '风水罗盘',
|
||||
theme: ThemeData(
|
||||
primarySwatch: createMaterialColor(const Color(0xCFA77300)),
|
||||
),
|
||||
debugShowCheckedModeBanner: false,
|
||||
home: const BottomNavigationWidget(),
|
||||
localizationsDelegates: const [
|
||||
GlobalMaterialLocalizations.delegate,
|
||||
GlobalWidgetsLocalizations.delegate,
|
||||
GlobalCupertinoLocalizations.delegate,
|
||||
],
|
||||
supportedLocales: const [
|
||||
//此处
|
||||
Locale('zh'),
|
||||
Locale('en'),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user