feat: 完成智能电网电工端 Flutter 应用初始化

创建完整的 Flutter 项目结构,包含 Android 和 iOS 平台配置、核心网络层、路由、状态管理及业务模块(订单、收益、认证),适配原 uni-app 项目功能逻辑
This commit is contained in:
andyesfly committed 2026-10-06 11:54:10 +08:00
commit 56830e94ec
108 files changed
+9272

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import '../core/app_keys.dart';
import '../core/theme/app_theme.dart';
import '../core/theme/app_typography.dart';
import 'router.dart';
class VoltLinkApp extends ConsumerWidget {
const VoltLinkApp({super.key});
@override
Widget build(BuildContext context, WidgetRef ref) {
final router = ref.watch(routerProvider);
return MaterialApp.router(
title: 'VoltLink',
debugShowCheckedModeBanner: false,
theme: AppTheme.build(),
routerConfig: router,
scaffoldMessengerKey: AppKeys.scaffoldMessenger,
locale: const Locale('zh', 'CN'),
supportedLocales: const [Locale('zh', 'CN'), Locale('en', 'US')],
localizationsDelegates: const [
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
],
// 对应源 `page` 上的全局字体设置。
builder: (context, child) => DefaultTextStyle(
style: appDefaultTextStyle,
child: child ?? const SizedBox.shrink(),
),
);
}
}