基本完成

This commit is contained in:
zhutao
2025-08-28 16:27:56 +08:00
commit 5d7d233d2e
132 changed files with 6390 additions and 0 deletions

55
lib/main.dart Normal file
View File

@@ -0,0 +1,55 @@
import 'package:food_health/router/routes.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:provider/provider.dart';
import 'config/theme/theme.dart';
import 'providers/app_store.dart';
void main() {
runApp(
MultiProvider(
providers: [
ChangeNotifierProvider(create: (context) => AppStore()),
],
child: 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(
debugShowCheckedModeBanner: false,
routerConfig: goRouter,
localizationsDelegates: [],
themeMode: ThemeMode.light,
theme: ThemeData(
useMaterial3: true,
colorScheme: scheme,
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
backgroundColor: scheme.primary,
foregroundColor: scheme.onPrimary,
),
),
textTheme: textTheme,
scaffoldBackgroundColor: Color(0xffFAFAFE),
appBarTheme: AppBarTheme(
backgroundColor: scheme.surface,
scrolledUnderElevation: 0,
titleTextStyle: textTheme.titleMedium,
),
),
builder: EasyLoading.init(),
),
);
}
}