36 lines
989 B
Dart
36 lines
989 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
|
import 'package:app/router/routes.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
import 'config/theme/theme.dart';
|
|
|
|
void main() {
|
|
runApp(const MyApp());
|
|
}
|
|
|
|
class MyApp extends StatelessWidget {
|
|
const MyApp({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return ScreenUtilInit(
|
|
designSize: const Size(375, 694),
|
|
useInheritedMediaQuery: true,
|
|
child: MaterialApp.router(
|
|
locale: const Locale('zh'),
|
|
supportedLocales: const [
|
|
Locale('zh'),
|
|
Locale('en'),
|
|
],
|
|
localizationsDelegates: GlobalMaterialLocalizations.delegates,
|
|
debugShowCheckedModeBanner: false,
|
|
routerConfig: goRouter,
|
|
theme: AppTheme.createTheme(LightTheme()),
|
|
builder: EasyLoading.init(),
|
|
),
|
|
);
|
|
}
|
|
}
|