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

+44
View File
@@ -0,0 +1,44 @@
import 'package:flutter/material.dart';
import '../../core/theme/app_colors.dart';
/// 订单类型标签。对应源里的 `.order-type` / `.job-type`:
/// - `urgent` 紧急:浅红底 + 深红字
/// - `standard` 标准 / `regular` 常规:浅灰底 + 深灰字
///
/// 列表页字号 10,详情页 13,用 [compact] 区分。
class XTypeChip extends StatelessWidget {
const XTypeChip({
super.key,
required this.type,
required this.text,
this.compact = true,
});
/// `urgent` | `standard` | `regular`
final String type;
final String text;
final bool compact;
@override
Widget build(BuildContext context) {
final urgent = type == 'urgent';
return Container(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 4),
decoration: BoxDecoration(
color: urgent ? AppColors.errorContainer : AppColors.surfaceContainerHigh,
borderRadius: BorderRadius.circular(8),
),
child: Text(
text,
style: TextStyle(
fontSize: compact ? 10 : 13,
fontWeight: FontWeight.w600,
color: urgent
? (compact ? AppColors.onErrorContainer : AppColors.error)
: AppColors.onSurfaceVariant,
),
),
);
}
}