|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
|
|
|
|
|
|
|
import 'pages/home_page.dart';
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
|
|
runApp(MyApp());
|
|
|
|
}
|
|
|
|
|
|
|
|
class MyApp extends StatelessWidget {
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return MaterialApp(
|
|
|
|
debugShowCheckedModeBanner: false,
|
|
|
|
title: 'Quill Demo',
|
|
|
|
theme: ThemeData(
|
|
|
|
primarySwatch: Colors.blue,
|
|
|
|
visualDensity: VisualDensity.adaptivePlatformDensity,
|
|
|
|
useMaterial3: true,
|
|
|
|
brightness: Brightness.light,
|
|
|
|
),
|
|
|
|
darkTheme: ThemeData(
|
|
|
|
primarySwatch: Colors.blue,
|
|
|
|
visualDensity: VisualDensity.adaptivePlatformDensity,
|
|
|
|
useMaterial3: true,
|
|
|
|
brightness: Brightness.dark,
|
|
|
|
),
|
|
|
|
// ignore: avoid_redundant_argument_values
|
|
|
|
themeMode: ThemeMode.system,
|
|
|
|
localizationsDelegates: [
|
|
|
|
GlobalMaterialLocalizations.delegate,
|
|
|
|
GlobalWidgetsLocalizations.delegate,
|
|
|
|
GlobalCupertinoLocalizations.delegate,
|
|
|
|
],
|
|
|
|
supportedLocales: [
|
|
|
|
const Locale('en', 'US'),
|
|
|
|
const Locale('zh', 'HK'),
|
|
|
|
],
|
|
|
|
home: HomePage(),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|