transfering

This commit is contained in:
2025-08-30 07:52:00 +08:00
parent 96b72ef1a3
commit 5cd03e1b3e
13 changed files with 1371 additions and 738 deletions
+34 -2
View File
@@ -156,6 +156,15 @@ build_app_image() {
fi
;;
"boot")
# 预构建 JAR 包
echo "🔨 预构建 Spring Boot JAR 包..."
if [ ! -f "ljwx-boot/ljwx-boot-admin/target/*.jar" ]; then
echo "⚠️ 未找到预构建的JAR文件,需要先构建Java项目"
echo "💡 请运行: cd ljwx-boot && mvn clean package -DskipTests"
exit 1
else
echo "✅ 找到预构建的JAR文件"
fi
if [ "$LOCAL_BUILD" = "true" ] && [ "$PLATFORMS" = "linux/amd64" ]; then
docker build -t $tag -t $latest_tag . -f ljwx-boot/ljwx-boot-admin/Dockerfile.prod
else
@@ -163,13 +172,36 @@ build_app_image() {
fi
;;
"bigscreen")
# 更新了使用Python 3.12
if [ "$LOCAL_BUILD" = "true" ] && [ "$PLATFORMS" = "linux/amd64" ]; then
docker build -t $tag -t $latest_tag ljwx-bigscreen/bigscreen/ -f ljwx-bigscreen/bigscreen/Dockerfile.multiarch
docker build -t $tag -t $latest_tag ljwx-bigscreen/bigscreen/ -f ljwx-bigscreen/bigscreen/Dockerfile.prod
else
docker $build_args -t $tag -t $latest_tag ljwx-bigscreen/bigscreen/ -f ljwx-bigscreen/bigscreen/Dockerfile.multiarch
docker $build_args -t $tag -t $latest_tag ljwx-bigscreen/bigscreen/ -f ljwx-bigscreen/bigscreen/Dockerfile.prod
fi
;;
"admin")
# 预构建前端资源
echo "🔨 预构建前端资源..."
if [ ! -d "ljwx-admin/dist" ]; then
echo "⚠️ 未找到预构建的dist目录,正在执行前端构建..."
cd ljwx-admin
if command -v pnpm >/dev/null 2>&1; then
echo "使用 pnpm 构建..."
pnpm install --frozen-lockfile
pnpm run build
elif command -v npm >/dev/null 2>&1; then
echo "使用 npm 构建..."
npm install
npm run build
else
echo "❌ 未找到 pnpm 或 npm,请安装 Node.js 和包管理器"
exit 1
fi
cd ..
echo "✅ 前端构建完成"
else
echo "✅ 找到预构建的dist目录"
fi
if [ "$LOCAL_BUILD" = "true" ] && [ "$PLATFORMS" = "linux/amd64" ]; then
docker build -t $tag -t $latest_tag ljwx-admin/ -f ljwx-admin/Dockerfile.prod
else
+5 -56
View File
@@ -1,56 +1,4 @@
# 多阶段构建,减小镜像体积
FROM node:18-alpine AS builder
# 设置北京时区
ENV TZ=Asia/Shanghai
RUN apk add --no-cache tzdata && \
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
echo $TZ > /etc/timezone
RUN corepack enable && corepack prepare [email protected] --activate
WORKDIR /app
COPY package.json pnpm-lock.yaml .npmrc pnpm-workspace.yaml ./
COPY packages/ ./packages/
RUN pnpm install --frozen-lockfile
COPY src/ ./src/
COPY public/ ./public/
COPY build/ ./build/
COPY index.html ./
COPY vite.config.ts ./
COPY tsconfig.json ./
COPY uno.config.ts ./
ENV VITE_BASE_URL=./
ARG VITE_APP_TITLE=穿戴健康管理平台
ARG VITE_APP_DESC=穿戴健康管理平台
ENV VITE_APP_TITLE=${VITE_APP_TITLE}
ENV VITE_APP_DESC=${VITE_APP_DESC}
ENV VITE_ICON_PREFIX=icon
ENV VITE_ICON_LOCAL_PREFIX=icon-local
ENV VITE_AUTH_ROUTE_MODE=dynamic
ENV VITE_ROUTE_HOME=home
ENV VITE_MENU_ICON=mdi:menu
ENV VITE_HTTP_PROXY=Y
ENV VITE_ROUTER_HISTORY_MODE=hash
ENV VITE_SERVICE_SUCCESS_CODE=200
ENV VITE_SERVICE_LOGOUT_CODES=600,401
ENV VITE_SERVICE_MODAL_LOGOUT_CODES=401
ENV VITE_SERVICE_EXPIRED_TOKEN_CODES=40101
ENV VITE_STATIC_SUPER_ROLE=R_SUPER
ENV VITE_AUTH_BUTTON_MODE=route_meta
ENV VITE_SOURCE_MAP=N
ENV VITE_STORAGE_PREFIX=SOY_
ENV VITE_AUTOMATICALLY_DETECT_UPDATE=Y
ENV VITE_HTTP_PROXY=Y
ENV VITE_API_URL=/proxy-default
ENV VITE_SERVICE_BASE_URL=/proxy-default
ENV VITE_OTHER_SERVICE_BASE_URL='{"bigscreen": "/bigscreen/"}'
ARG VITE_BIGSCREEN_URL=http://localhost:8001
ARG VITE_CUSTOM_LOGO=false
ENV VITE_BIGSCREEN_URL=${VITE_BIGSCREEN_URL}
ENV VITE_CUSTOM_LOGO=${VITE_CUSTOM_LOGO}
RUN pnpm run build
# 生产环境nginx镜像
# 使用预构建的 dist 目录
FROM nginx:alpine
# 设置北京时区
@@ -60,9 +8,10 @@ RUN apk add --no-cache tzdata && \
echo $TZ > /etc/timezone
RUN apk add --no-cache findutils # 添加find命令支持
COPY --from=builder /app/dist /usr/share/nginx/html
COPY nginx/nginx.conf /etc/nginx/nginx.conf
COPY docker-entrypoint.sh /docker-entrypoint.sh
# 直接复制预构建的 dist 目录
COPY ljwx-admin/dist /usr/share/nginx/html
COPY ljwx-admin/nginx/nginx.conf /etc/nginx/nginx.conf
COPY ljwx-admin/docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh
EXPOSE 80
ENTRYPOINT ["/docker-entrypoint.sh"]
+21 -13
View File
@@ -1,26 +1,34 @@
# 构建阶段 - 使用标准Python镜像以提高兼容性
FROM python:3.9-slim AS builder
# 构建阶段 - 使用标准Python 3.12镜像以提高兼容性
FROM python:3.12-slim AS builder
WORKDIR /app
# 安装构建依赖
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc g++ pkg-config libmariadb-dev && \
pip install --no-cache-dir --upgrade pip
# 使用阿里云镜像源加速,禁用代理
RUN unset http_proxy https_proxy && \
echo "deb https://mirrors.aliyun.com/debian bookworm main" > /etc/apt/sources.list && \
echo "deb https://mirrors.aliyun.com/debian-security bookworm-security main" >> /etc/apt/sources.list && \
echo "deb https://mirrors.aliyun.com/debian bookworm-updates main" >> /etc/apt/sources.list && \
apt-get update --fix-missing && \
apt-get install -y --no-install-recommends gcc g++ pkg-config default-libmysqlclient-dev && \
pip install --no-cache-dir --upgrade pip -i https://mirrors.aliyun.com/pypi/simple/
COPY requirements-docker.txt .
RUN pip install --no-cache-dir --user -r requirements-docker.txt
RUN pip install --no-cache-dir --user -r requirements-docker.txt -i https://mirrors.aliyun.com/pypi/simple/
# 运行阶段 - 使用slim镜像
FROM python:3.9-slim
# 运行阶段 - 使用Python 3.12 slim镜像
FROM python:3.12-slim
WORKDIR /app
# 只安装运行时必需的库
RUN apt-get update && apt-get install -y --no-install-recommends \
libmariadb3 tzdata && \
# 使用阿里云镜像源加速,禁用代理
RUN unset http_proxy https_proxy && \
echo "deb https://mirrors.aliyun.com/debian bookworm main" > /etc/apt/sources.list && \
echo "deb https://mirrors.aliyun.com/debian-security bookworm-security main" >> /etc/apt/sources.list && \
echo "deb https://mirrors.aliyun.com/debian bookworm-updates main" >> /etc/apt/sources.list && \
apt-get update --fix-missing && \
apt-get install -y --no-install-recommends default-mysql-client tzdata && \
ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# 从构建阶段复制Python包
COPY --from=builder /root/.local /root/.local
# 确保Python包在PATH中
ENV PATH=/root/.local/bin:$PATH
ENV PYTHONPATH=/root/.local/lib/python3.9/site-packages:$PYTHONPATH
ENV PYTHONPATH=/root/.local/lib/python3.12/site-packages:$PYTHONPATH
# 复制应用文件
COPY . .
# 清理Python缓存和不需要的文件
File diff suppressed because it is too large Load Diff
+3 -51
View File
@@ -1,58 +1,10 @@
# 多阶段构建
FROM maven:3-eclipse-temurin-21 AS builder
WORKDIR /app
# 配置Maven以使用阿里云镜像和增加超时时间
RUN mkdir -p /root/.m2 && \
echo '<?xml version="1.0" encoding="UTF-8"?>' > /root/.m2/settings.xml && \
echo '<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"' >> /root/.m2/settings.xml && \
echo ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' >> /root/.m2/settings.xml && \
echo ' xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0' >> /root/.m2/settings.xml && \
echo ' http://maven.apache.org/xsd/settings-1.0.0.xsd">' >> /root/.m2/settings.xml && \
echo ' <mirrors>' >> /root/.m2/settings.xml && \
echo ' <mirror>' >> /root/.m2/settings.xml && \
echo ' <id>aliyun</id>' >> /root/.m2/settings.xml && \
echo ' <name>Aliyun Maven</name>' >> /root/.m2/settings.xml && \
echo ' <url>https://maven.aliyun.com/repository/public</url>' >> /root/.m2/settings.xml && \
echo ' <mirrorOf>central</mirrorOf>' >> /root/.m2/settings.xml && \
echo ' </mirror>' >> /root/.m2/settings.xml && \
echo ' </mirrors>' >> /root/.m2/settings.xml && \
echo ' <profiles>' >> /root/.m2/settings.xml && \
echo ' <profile>' >> /root/.m2/settings.xml && \
echo ' <id>default</id>' >> /root/.m2/settings.xml && \
echo ' <activation><activeByDefault>true</activeByDefault></activation>' >> /root/.m2/settings.xml && \
echo ' <repositories>' >> /root/.m2/settings.xml && \
echo ' <repository>' >> /root/.m2/settings.xml && \
echo ' <id>aliyun</id>' >> /root/.m2/settings.xml && \
echo ' <url>https://maven.aliyun.com/repository/public</url>' >> /root/.m2/settings.xml && \
echo ' <releases><enabled>true</enabled></releases>' >> /root/.m2/settings.xml && \
echo ' <snapshots><enabled>true</enabled></snapshots>' >> /root/.m2/settings.xml && \
echo ' </repository>' >> /root/.m2/settings.xml && \
echo ' </repositories>' >> /root/.m2/settings.xml && \
echo ' </profile>' >> /root/.m2/settings.xml && \
echo ' </profiles>' >> /root/.m2/settings.xml && \
echo '</settings>' >> /root/.m2/settings.xml
# 先复制并构建ljwx-boot-starter
COPY ljwx-boot-starter ./ljwx-boot-starter
WORKDIR /app/ljwx-boot-starter
RUN mvn clean install -DskipTests -Dmaven.wagon.http.connectTimeout=60000 -Dmaven.wagon.http.readTimeout=120000
# 然后构建ljwx-boot
WORKDIR /app
COPY ljwx-boot/pom.xml .
COPY ljwx-boot/ljwx-boot-admin ./ljwx-boot-admin
COPY ljwx-boot/ljwx-boot-common ./ljwx-boot-common
COPY ljwx-boot/ljwx-boot-infrastructure ./ljwx-boot-infrastructure
COPY ljwx-boot/ljwx-boot-modules ./ljwx-boot-modules
RUN mvn clean package -DskipTests -pl ljwx-boot-admin -am -Dmaven.wagon.http.connectTimeout=60000 -Dmaven.wagon.http.readTimeout=120000
# 运行阶段 - 使用Alpine JRE镜像优化大小
# 直接使用预构建的JAR包
FROM eclipse-temurin:21-jre-alpine
LABEL maintainer="[email protected]"
ENV TZ='Asia/Shanghai'
RUN apk add --no-cache tzdata && ln -snf /usr/share/zoneinfo/"$TZ" /etc/localtime && echo "$TZ" > /etc/timezone
WORKDIR /app
COPY --from=builder /app/ljwx-boot-admin/target/*.jar app.jar
# 直接复制预构建的JAR文件
COPY ljwx-boot/ljwx-boot-admin/target/*.jar app.jar
EXPOSE 9998
ENTRYPOINT ["java","-Xms256m","-Xmx512m","-jar","app.jar"]
+237
View File
@@ -0,0 +1,237 @@
# 企业级UI优化实施指南
## 项目概述
ljwx-phone 健康管理应用已成功升级为企业级UI设计系统。本次优化从消费级产品UI升级为专业的企业级健康管理系统界面。
## 🎯 优化成果
### 1. 建立了完整的企业级设计系统
#### 设计系统架构
```
lib/design_system/
├── colors.dart # 色彩规范 (主品牌色、语义色、健康数据色)
├── typography.dart # 文字规范 (Nunito+Roboto字体系统)
├── spacing.dart # 间距规范 (8px网格系统)
├── theme.dart # 主题配置 (完整的浅色/深色主题)
├── design_system.dart # 统一导出
└── components/ # 企业级组件库
├── ds_card.dart # 基础卡片组件
├── ds_health_card.dart # 健康数据卡片
├── ds_info_card.dart # 信息展示卡片
├── ds_chart.dart # 专业图表组件
├── ds_stats.dart # 统计展示组件
└── components.dart # 组件统一导出
```
#### 关键特性
- **专业色彩系统**: 医疗级配色方案,支持深色模式
- **企业级字体**: Google Fonts Nunito + Roboto 组合
- **8px网格系统**: 统一的间距和尺寸规范
- **完整组件库**: 20+ 专业UI组件
- **Material 3**: 基于最新设计语言
### 2. 核心组件系统
#### 基础组件
- `DSCard`: 8种不同样式的企业级卡片
- standard, info, warning, error, success, gradient, flat
- `DSHealthCard`: 专业健康数据展示
- heartRate, bloodOxygen, temperature, bloodPressure, steps
- `DSInfoCard`: 多用途信息卡片
- user, device, alert, stats
#### 数据可视化组件
- `DSHealthTrendChart`: 健康数据趋势图
- `DSHealthRadarChart`: 健康评分雷达图
- `DSStatsDashboard`: 统计仪表盘
- `DSCircularProgress`: 圆形进度指示器
- `DSBarChart`: 专业柱状图
### 3. 企业级色彩系统
#### 主品牌色
- Primary: #1976D2 (专业蓝)
- Secondary: #009688 (青绿色)
- 完整的50-900色阶
#### 健康数据专用色彩
- 心率: #E53935 (红色)
- 血氧: #1976D2 (蓝色)
- 体温: #FF9800 (橙色)
- 血压: #8E24AA (紫色)
- 步数: #4CAF50 (绿色)
#### 语义化色彩
- Success: #4CAF50
- Warning: #FF9800
- Error: #F44336
- Info: #2196F3
## 🚀 使用方法
### 1. 导入设计系统
```dart
import 'package:ljwx_health_new/design_system/design_system.dart';
```
### 2. 使用企业级组件
```dart
// 健康数据卡片
DSHealthCard.heartRate(
value: '75',
status: '正常',
onTap: () => Navigator.push(...),
)
// 专业图表
DSHealthTrendChart.heartRate(
data: heartRateData,
subtitle: '过去24小时趋势',
)
// 信息展示卡片
DSInfoCard.user(
name: '张三',
subtitle: '工号:1-005',
details: userDetails,
)
```
### 3. 应用新主题
```dart
// main.dart 中应用企业级主题
MaterialApp(
theme: DSTheme.buildLightTheme(),
darkTheme: DSTheme.buildDarkTheme(),
home: MyApp(),
)
```
## 📱 界面优化对比
### 优化前
- 消费级产品风格
- 色彩不够专业
- 信息层次不清晰
- 缺乏统一设计语言
- 数据可视化效果有限
### 优化后
- 企业级专业外观
- 医疗健康专业配色
- 清晰的视觉层次
- 统一的设计系统
- 丰富的数据可视化
## 🔧 实施步骤
### Phase 1: 设计系统集成 ✅
- [x] 建立色彩、字体、间距规范
- [x] 创建企业级主题配置
- [x] 更新现有主题文件
### Phase 2: 基础组件开发 ✅
- [x] DSCard 卡片组件系统
- [x] DSHealthCard 健康数据组件
- [x] DSInfoCard 信息展示组件
### Phase 3: 数据可视化 ✅
- [x] 专业图表组件库
- [x] 统计展示组件
- [x] 进度指示器组件
### Phase 4: 测试和优化 ✅
- [x] 创建展示页面
- [x] 编写实施指南
- [x] 性能优化建议
## 🎨 设计展示页面
创建了 `DSShowcasePage` 用于演示所有设计系统组件:
- 色彩系统展示
- 卡片组件演示
- 健康数据组件示例
- 信息卡片展示
- 统计组件演示
- 图表组件展示
## 📋 下一步实施建议
### 1. 渐进式升级
```dart
// 在现有页面中逐步替换组件
// 例如:home_screen.dart
// 原来的代码
Card(child: UserInfoCard(...))
// 升级为企业级组件
DSInfoCard.user(
name: user.name,
subtitle: user.subtitle,
details: user.details,
)
```
### 2. 主题应用
更新 `main.dart` 应用新主题:
```dart
theme: AppTheme.lightTheme, // 已更新为使用DSTheme
darkTheme: AppTheme.darkTheme,
```
### 3. 组件迁移优先级
1. **高频组件**: 首页卡片、健康数据展示
2. **关键页面**: 设备管理、告警中心
3. **详情页面**: 健康详情、用户详情
4. **辅助页面**: 设置页面、关于页面
### 4. 性能优化
- 使用 `const` 构造函数减少重建
- 图表组件使用缓存策略
- 大数据集分页加载
- 图片资源优化
## 🛠 技术要求
### 依赖检查
确保 pubspec.yaml 包含:
```yaml
dependencies:
flutter:
sdk: flutter
fl_chart: ^0.63.0 # 图表库
google_fonts: ^6.1.0 # 字体库
```
### 兼容性
- Flutter 3.0+
- Material 3 设计语言
- iOS 12+ / Android API 21+
- 支持深色模式
## 🔍 质量保证
### 代码质量
- 遵循Flutter编码规范
- 完整的文档注释
- 组件可复用性设计
- 类型安全
### 用户体验
- 响应式设计适配
- 无障碍功能支持
- 流畅的动画过渡
- 一致的交互反馈
## 📞 支持
如有问题或需要支持,请联系开发团队。企业级设计系统将持续优化和扩展。
---
**企业级UI优化已完成 🎉**
现在ljwx-phone具备了专业的企业级健康管理系统界面,提升了用户体验和产品竞争力。
+4
View File
@@ -1,6 +1,7 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:ljwx_health_new/config/app_config.dart';
import 'package:ljwx_health_new/models/login_response.dart';
// 为了向后兼容,保留全局变量但从AppConfig获取值 #向后兼容全局变量
String get deviceSn => AppConfig.instance.deviceSn; // 全局设备序列号
@@ -9,6 +10,9 @@ String get customerName => AppConfig.instance.customerName; // 全局客户名
String get uploadMethod => AppConfig.instance.uploadMethod; // 上传方式:bluetooth或wifi
Map<String, dynamic> get systemConfig => AppConfig.instance.systemConfig; // 系统配置
// 登录数据全局变量
LoginData? loginData;
// setter方法用于向后兼容 #向后兼容setter
set deviceSn(String value) => AppConfig.instance.setDeviceSn(value);
set globalDeviceSn(String value) => AppConfig.instance.setDeviceSn(value);
+142 -30
View File
@@ -112,41 +112,153 @@ class _AlertsScreenState extends State<AlertsScreen> {
}
Widget _buildAlertDetails(alert.Alert alert, ThemeData theme) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'告警详情',
style: theme.textTheme.titleLarge,
),
const SizedBox(height: 16),
_buildInfoRow('设备名称', alert.deviceSn, theme),
_buildInfoRow('部门', alert.deptName, theme),
_buildInfoRow('状态', alert.alertStatus, theme),
_buildInfoRow('时间', alert.alertTimestamp, theme),
const SizedBox(height: 16),
Text(
'告警信息',
style: theme.textTheme.titleMedium,
),
const SizedBox(height: 8),
Text(alert.alertDesc),
const SizedBox(height: 16),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
TextButton(
onPressed: () {
// TODO: 处理告警
},
child: Text('处理'),
return Padding(
padding: const EdgeInsets.all(20.0),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'告警详情',
style: theme.textTheme.titleLarge,
),
IconButton(
icon: const Icon(Icons.close),
onPressed: () => Navigator.of(context).pop(),
),
],
),
const SizedBox(height: 16),
_buildInfoRow('设备序列号', alert.deviceSn, theme),
_buildInfoRow('部门', alert.deptName, theme),
_buildInfoRow('告警类型', alert.alertType, theme),
_buildInfoRow('当前状态', alert.alertStatus, theme),
_buildInfoRow('告警时间', alert.alertTimestamp, theme),
const SizedBox(height: 16),
Text(
'告警信息',
style: theme.textTheme.titleMedium,
),
const SizedBox(height: 8),
Container(
width: double.infinity,
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(
color: Colors.grey[100],
borderRadius: BorderRadius.circular(8),
),
child: Text(
alert.alertDesc,
style: theme.textTheme.bodyMedium,
),
),
const SizedBox(height: 20),
// 处理按钮
if (alert.alertStatus.toLowerCase() != 'processed') ...[
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
TextButton(
onPressed: () => Navigator.of(context).pop(),
child: const Text('取消'),
),
const SizedBox(width: 8),
ElevatedButton(
onPressed: () => _processAlert(alert),
style: ElevatedButton.styleFrom(
backgroundColor: Colors.green,
foregroundColor: Colors.white,
),
child: const Text('标记为已处理'),
),
],
),
] else ...[
Container(
width: double.infinity,
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(
color: Colors.green[100],
borderRadius: BorderRadius.circular(8),
),
child: Row(
children: [
Icon(Icons.check_circle, color: Colors.green[700]),
const SizedBox(width: 8),
Text(
'此告警已处理',
style: TextStyle(
color: Colors.green[700],
fontWeight: FontWeight.w500,
),
),
],
),
),
],
),
],
],
),
);
}
// 处理告警的方法
Future<void> _processAlert(alert.Alert alert) async {
try {
// 显示加载指示器
showDialog(
context: context,
barrierDismissible: false,
builder: (context) => const Center(
child: CircularProgressIndicator(),
),
);
// 调用API处理告警
final success = await _apiService.markAlertAsProcessed(alert.alertId.toString());
// 关闭加载指示器
Navigator.of(context).pop();
if (success) {
// 处理成功
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text('告警已标记为已处理'),
backgroundColor: Colors.green,
),
);
// 关闭详情对话框
Navigator.of(context).pop();
// 刷新数据
_fetchPersonalInfo();
} else {
// 处理失败
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text('处理告警信息失败,请重试'),
backgroundColor: Colors.red,
),
);
}
} catch (e) {
// 关闭可能存在的加载指示器
Navigator.of(context).pop();
// 显示错误信息
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text('处理告警失败:$e'),
backgroundColor: Colors.red,
),
);
}
}
Widget _buildInfoRow(String label, String value, ThemeData theme) {
return Padding(
padding: const EdgeInsets.only(bottom: 8.0),
@@ -246,6 +246,29 @@ class _HealthAnalysisScreenState extends State<HealthAnalysisScreen> {
suggestions.add((detail['suggestions'] as List<dynamic>? ?? []).cast<String>());
}
// 确保至少有3个数据点用于雷达图
if (scores.length < 3) {
// 如果数据点不足3个,添加默认数据点
while (scores.length < 3) {
switch (scores.length) {
case 1:
metrics.add('心率');
scores.add(80.0); // 默认心率评分
statuses.add('normal');
messages.add('心率数据暂无记录');
suggestions.add(['建议定期监测心率']);
break;
case 2:
metrics.add('血氧');
scores.add(85.0); // 默认血氧评分
statuses.add('normal');
messages.add('血氧数据暂无记录');
suggestions.add(['建议定期监测血氧']);
break;
}
}
}
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@@ -300,10 +323,15 @@ class _HealthAnalysisScreenState extends State<HealthAnalysisScreen> {
ListView.builder(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemCount: metrics.length,
itemCount: sortedFactors.length, // 只显示真实数据
itemBuilder: (context, index) {
final factor = sortedFactors[index].value as Map<String, dynamic>;
final detail = details[sortedFactors[index].key] as Map<String, dynamic>? ?? {};
final metricName = factor['name'] as String;
final score = factor['score'] as double;
final status = factor['status'] as String;
final message = detail['message'] as String? ?? '';
final suggestionsList = (detail['suggestions'] as List<dynamic>? ?? []).cast<String>();
return Card(
margin: const EdgeInsets.only(bottom: 12),
@@ -316,7 +344,7 @@ class _HealthAnalysisScreenState extends State<HealthAnalysisScreen> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
metrics[index],
metricName,
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
@@ -325,13 +353,13 @@ class _HealthAnalysisScreenState extends State<HealthAnalysisScreen> {
Container(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
decoration: BoxDecoration(
color: _getStatusColor(statuses[index]).withOpacity(0.1),
color: _getStatusColor(status).withOpacity(0.1),
borderRadius: BorderRadius.circular(12),
),
child: Text(
_getStatusText(statuses[index]),
_getStatusText(status),
style: TextStyle(
color: _getStatusColor(statuses[index]),
color: _getStatusColor(status),
fontSize: 12,
),
),
@@ -340,13 +368,13 @@ class _HealthAnalysisScreenState extends State<HealthAnalysisScreen> {
),
const SizedBox(height: 8),
Text(
messages[index],
message,
style: const TextStyle(
fontSize: 14,
color: Colors.black87,
),
),
if (suggestions[index].isNotEmpty) ...[
if (suggestionsList.isNotEmpty) ...[
const SizedBox(height: 8),
const Text(
'建议:',
@@ -356,7 +384,7 @@ class _HealthAnalysisScreenState extends State<HealthAnalysisScreen> {
),
),
const SizedBox(height: 4),
...suggestions[index].map((suggestion) => Padding(
...suggestionsList.map((suggestion) => Padding(
padding: const EdgeInsets.only(bottom: 4),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
+49
View File
@@ -1145,4 +1145,53 @@ class ApiService {
};
}
}
/// 处理告警信息 #处理告警API
Future<Map<String, dynamic>> processAlert(String alertId, String status) async {
try {
debugPrint('处理告警请求,告警ID: $alertId,状态: $status');
final requestBody = {
'alert_id': alertId,
'status': status,
'processed_time': DateTime.now().toIso8601String(),
};
final response = await http.post(
Uri.parse('${_config.apiBaseUrl}/api/alerts/process'),
headers: _headers,
body: jsonEncode(requestBody),
).timeout(_timeout);
debugPrint('处理告警响应状态: ${response.statusCode}');
debugPrint('处理告警响应内容: ${response.body}');
if (response.statusCode == 200) {
final jsonData = jsonDecode(response.body);
return jsonData;
} else {
return {
'success': false,
'error': '服务器错误 (${response.statusCode}): ${response.body}'
};
}
} catch (e) {
debugPrint('处理告警失败: $e');
return {
'success': false,
'error': '处理告警失败:$e'
};
}
}
/// 标记告警为已处理 #标记告警已处理
Future<bool> markAlertAsProcessed(String alertId) async {
try {
final result = await processAlert(alertId, 'processed');
return result['success'] == true;
} catch (e) {
debugPrint('标记告警已处理失败: $e');
return false;
}
}
}
+30 -281
View File
@@ -1,292 +1,41 @@
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import '../design_system/design_system.dart';
class AppTheme {
// 主色调和强调色 - 专业健康应用配色
static const Color primaryColor = Color(0xFF1E88E5); // 主蓝色,适合医疗健康
static const Color accentColor = Color(0xFF43A047); // 绿色强调,代表健康
static const Color secondaryColor = Color(0xFF26A69A); // 青色,冷静专业
static const Color errorColor = Color(0xFFE53935); // 错误色
static const Color warningColor = Color(0xFFFFA000); // 警告色
static const Color successColor = Color(0xFF43A047); // 成功色
// ==================== 兼容性别名 ====================
// 为了兼容现有代码,保留旧的颜色别名
static const Color primaryColor = DSColors.primary500;
static const Color accentColor = DSColors.success500;
static const Color secondaryColor = DSColors.secondary500;
static const Color errorColor = DSColors.error500;
static const Color warningColor = DSColors.warning500;
static const Color successColor = DSColors.success500;
// 健康数据相关颜色
static const Color heartRateColor = Color(0xFFE53935); // 心率
static const Color bloodOxygenColor = Color(0xFF1E88E5); // 血氧
static const Color temperatureColor = Color(0xFFFFA000); // 体温
static const Color pressureColor = Color(0xFF8E24AA); // 血压
static const Color stepsColor = Color(0xFF43A047); // 步数
static const Color distanceColor = Color(0xFF3949AB); // 距离
static const Color calorieColor = Color(0xFFFF7043); // 卡路里
static const Color stressColor = Color(0xFFE53935); // 压力
// 健康数据相关颜色 - 使用设计系统色彩
static const Color heartRateColor = DSColors.heartRate;
static const Color bloodOxygenColor = DSColors.bloodOxygen;
static const Color temperatureColor = DSColors.temperature;
static const Color pressureColor = DSColors.bloodPressure;
static const Color stepsColor = DSColors.steps;
static const Color distanceColor = DSColors.distance;
static const Color calorieColor = DSColors.calories;
static const Color stressColor = DSColors.stress;
// 浅色主题
static ThemeData lightTheme = ThemeData(
useMaterial3: true,
brightness: Brightness.light,
colorScheme: ColorScheme.fromSeed(
seedColor: primaryColor,
primary: primaryColor,
secondary: secondaryColor,
error: errorColor,
brightness: Brightness.light,
),
textTheme: _buildTextTheme(Brightness.light),
appBarTheme: const AppBarTheme(
centerTitle: true,
elevation: 0,
backgroundColor: Colors.white,
foregroundColor: primaryColor,
shadowColor: Colors.transparent,
),
cardTheme: CardTheme(
elevation: 2,
clipBehavior: Clip.antiAlias,
margin: const EdgeInsets.symmetric(vertical: 8, horizontal: 0),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16),
),
),
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
elevation: 2,
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 12),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
backgroundColor: primaryColor,
foregroundColor: Colors.white,
),
),
outlinedButtonTheme: OutlinedButtonThemeData(
style: OutlinedButton.styleFrom(
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 12),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
side: const BorderSide(color: primaryColor, width: 1.5),
foregroundColor: primaryColor,
),
),
textButtonTheme: TextButtonThemeData(
style: TextButton.styleFrom(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
foregroundColor: primaryColor,
),
),
iconTheme: const IconThemeData(
color: primaryColor,
size: 24,
),
chipTheme: ChipThemeData(
backgroundColor: primaryColor.withOpacity(0.1),
labelStyle: TextStyle(color: primaryColor),
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 0),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16),
),
),
snackBarTheme: SnackBarThemeData(
backgroundColor: Colors.grey[900],
contentTextStyle: const TextStyle(color: Colors.white),
behavior: SnackBarBehavior.floating,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
),
navigationBarTheme: NavigationBarThemeData(
indicatorColor: primaryColor.withOpacity(0.2),
labelTextStyle: MaterialStateProperty.all(
const TextStyle(fontSize: 12, fontWeight: FontWeight.w500),
),
),
bottomSheetTheme: const BottomSheetThemeData(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(top: Radius.circular(20)),
),
),
);
// ==================== 主题数据 ====================
/// 浅色主题 - 使用企业级设计系统
static ThemeData lightTheme = DSTheme.buildLightTheme();
// 暗色主题
static ThemeData darkTheme = ThemeData(
useMaterial3: true,
brightness: Brightness.dark,
colorScheme: ColorScheme.fromSeed(
seedColor: primaryColor,
primary: primaryColor,
secondary: secondaryColor,
error: errorColor,
brightness: Brightness.dark,
),
textTheme: _buildTextTheme(Brightness.dark),
scaffoldBackgroundColor: const Color(0xFF15202B), // 深蓝灰背景色
appBarTheme: const AppBarTheme(
centerTitle: true,
elevation: 0,
backgroundColor: Color(0xFF1E2839),
foregroundColor: Colors.white,
shadowColor: Colors.transparent,
),
cardTheme: CardTheme(
elevation: 3,
clipBehavior: Clip.antiAlias,
margin: const EdgeInsets.symmetric(vertical: 8, horizontal: 0),
color: const Color(0xFF1E2839), // 略浅于背景的卡片色
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16),
),
),
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
elevation: 2,
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 12),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
backgroundColor: primaryColor,
foregroundColor: Colors.white,
),
),
outlinedButtonTheme: OutlinedButtonThemeData(
style: OutlinedButton.styleFrom(
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 12),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
side: const BorderSide(color: primaryColor, width: 1.5),
foregroundColor: Colors.white,
),
),
textButtonTheme: TextButtonThemeData(
style: TextButton.styleFrom(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
foregroundColor: Colors.white,
),
),
iconTheme: const IconThemeData(
color: Colors.white,
size: 24,
),
chipTheme: ChipThemeData(
backgroundColor: Colors.white.withOpacity(0.1),
labelStyle: const TextStyle(color: Colors.white),
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 0),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16),
),
),
snackBarTheme: const SnackBarThemeData(
backgroundColor: Color(0xFF2D3748),
contentTextStyle: TextStyle(color: Colors.white),
behavior: SnackBarBehavior.floating,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(8)),
),
),
navigationBarTheme: NavigationBarThemeData(
backgroundColor: const Color(0xFF1E2839),
indicatorColor: primaryColor.withOpacity(0.3),
labelTextStyle: MaterialStateProperty.all(
const TextStyle(fontSize: 12, fontWeight: FontWeight.w500, color: Colors.white70),
),
),
bottomSheetTheme: const BottomSheetThemeData(
backgroundColor: Color(0xFF1E2839),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(top: Radius.circular(20)),
),
),
);
/// 暗色主题 - 使用企业级设计系统
static ThemeData darkTheme = DSTheme.buildDarkTheme();
// 构建优化的文字主题
// ==================== 兼容性方法 ====================
/// 构建文字主题 - 保持向后兼容
/// 现在委托给设计系统
static TextTheme _buildTextTheme(Brightness brightness) {
final isDark = brightness == Brightness.dark;
final baseTextColor = isDark ? Colors.white : Colors.black87;
return TextTheme(
displayLarge: GoogleFonts.nunito(
fontSize: 28,
fontWeight: FontWeight.bold,
color: baseTextColor,
letterSpacing: -0.5,
),
displayMedium: GoogleFonts.nunito(
fontSize: 24,
fontWeight: FontWeight.bold,
color: baseTextColor,
letterSpacing: -0.25,
),
displaySmall: GoogleFonts.nunito(
fontSize: 22,
fontWeight: FontWeight.bold,
color: baseTextColor,
),
headlineLarge: GoogleFonts.nunito(
fontSize: 20,
fontWeight: FontWeight.w700,
color: baseTextColor,
),
headlineMedium: GoogleFonts.nunito(
fontSize: 18,
fontWeight: FontWeight.w700,
color: baseTextColor,
),
headlineSmall: GoogleFonts.nunito(
fontSize: 16,
fontWeight: FontWeight.w700,
color: baseTextColor,
),
titleLarge: GoogleFonts.nunito(
fontSize: 18,
fontWeight: FontWeight.w600,
color: baseTextColor,
),
titleMedium: GoogleFonts.nunito(
fontSize: 16,
fontWeight: FontWeight.w600,
color: baseTextColor,
),
titleSmall: GoogleFonts.nunito(
fontSize: 14,
fontWeight: FontWeight.w600,
color: baseTextColor,
),
bodyLarge: GoogleFonts.nunito(
fontSize: 16,
fontWeight: FontWeight.normal,
color: baseTextColor.withOpacity(0.9),
),
bodyMedium: GoogleFonts.nunito(
fontSize: 14,
fontWeight: FontWeight.normal,
color: baseTextColor.withOpacity(0.9),
),
bodySmall: GoogleFonts.nunito(
fontSize: 12,
fontWeight: FontWeight.normal,
color: baseTextColor.withOpacity(0.7),
),
labelLarge: GoogleFonts.nunito(
fontSize: 14,
fontWeight: FontWeight.w500,
color: baseTextColor,
),
labelMedium: GoogleFonts.nunito(
fontSize: 12,
fontWeight: FontWeight.w500,
color: baseTextColor,
),
labelSmall: GoogleFonts.nunito(
fontSize: 10,
fontWeight: FontWeight.w500,
color: baseTextColor.withOpacity(0.7),
),
);
final baseColor = brightness == Brightness.dark ? DSColors.white : DSColors.gray900;
return DSTypography.buildTextTheme(baseColor);
}
}
+150 -142
View File
@@ -6,7 +6,7 @@ packages:
description:
name: archive
sha256: "2fde1607386ab523f7a36bb3e7edb43bd58e6edaf2ffb29d8a6d578b297fdbbd"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "4.0.7"
args:
@@ -14,23 +14,23 @@ packages:
description:
name: args
sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.7.0"
async:
dependency: transitive
description:
name: async
sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63
url: "https://pub.dev"
sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.12.0"
version: "2.13.0"
bluez:
dependency: transitive
description:
name: bluez
sha256: "61a7204381925896a374301498f2f5399e59827c6498ae1e924aaa598751b545"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.8.3"
boolean_selector:
@@ -38,7 +38,7 @@ packages:
description:
name: boolean_selector
sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.2"
characters:
@@ -46,23 +46,23 @@ packages:
description:
name: characters
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.4.0"
checked_yaml:
dependency: transitive
description:
name: checked_yaml
sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff
url: "https://pub.dev"
sha256: "959525d3162f249993882720d52b7e0c833978df229be20702b33d48d91de70f"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.3"
version: "2.0.4"
cli_util:
dependency: transitive
description:
name: cli_util
sha256: ff6785f7e9e3c38ac98b2fb035701789de90154024a75b6cb926445e83197d1c
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.4.2"
clock:
@@ -70,7 +70,7 @@ packages:
description:
name: clock
sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.2"
collection:
@@ -78,7 +78,7 @@ packages:
description:
name: collection
sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.19.1"
crypto:
@@ -86,7 +86,7 @@ packages:
description:
name: crypto
sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.6"
cupertino_icons:
@@ -94,7 +94,7 @@ packages:
description:
name: cupertino_icons
sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.8"
dbus:
@@ -102,23 +102,23 @@ packages:
description:
name: dbus
sha256: "79e0c23480ff85dc68de79e2cd6334add97e48f7f4865d17686dd6ea81a47e8c"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.7.11"
dio:
dependency: "direct main"
description:
name: dio
sha256: "253a18bbd4851fecba42f7343a1df3a9a4c1d31a2c1b37e221086b4fa8c8dbc9"
url: "https://pub.dev"
sha256: d90ee57923d1828ac14e492ca49440f65477f4bb1263575900be731a3dac66a9
url: "https://pub.flutter-io.cn"
source: hosted
version: "5.8.0+1"
version: "5.9.0"
dio_web_adapter:
dependency: transitive
description:
name: dio_web_adapter
sha256: "7586e476d70caecaf1686d21eee7247ea43ef5c345eab9e0cc3583ff13378d78"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.1"
equatable:
@@ -126,23 +126,23 @@ packages:
description:
name: equatable
sha256: "567c64b3cb4cf82397aac55f4f0cbd3ca20d77c6c03bedbc4ceaddc08904aef7"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.7"
fake_async:
dependency: transitive
description:
name: fake_async
sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc"
url: "https://pub.dev"
sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.2"
version: "1.3.3"
ffi:
dependency: transitive
description:
name: ffi
sha256: "289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.4"
file:
@@ -150,7 +150,7 @@ packages:
description:
name: file
sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "7.0.1"
fl_chart:
@@ -158,7 +158,7 @@ packages:
description:
name: fl_chart
sha256: c1e26c7e48496be85104c16c040950b0436674cdf0737f3f6e95511b2529b592
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.63.0"
flutter:
@@ -171,7 +171,7 @@ packages:
description:
name: flutter_animate
sha256: "7befe2d3252728afb77aecaaea1dec88a89d35b9b1d2eea6d04479e8af9117b5"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "4.5.2"
flutter_blue_plus:
@@ -179,7 +179,7 @@ packages:
description:
name: flutter_blue_plus
sha256: bfae0d24619940516261045d8b3c74b4c80ca82222426e05ffbf7f3ea9dbfb1a
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.35.5"
flutter_blue_plus_android:
@@ -187,7 +187,7 @@ packages:
description:
name: flutter_blue_plus_android
sha256: "9723dd4ba7dcc3f27f8202e1159a302eb4cdb88ae482bb8e0dd733b82230a258"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "4.0.5"
flutter_blue_plus_darwin:
@@ -195,7 +195,7 @@ packages:
description:
name: flutter_blue_plus_darwin
sha256: f34123795352a9761e321589aa06356d3b53f007f13f7e23e3c940e733259b2d
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "4.0.1"
flutter_blue_plus_linux:
@@ -203,7 +203,7 @@ packages:
description:
name: flutter_blue_plus_linux
sha256: "635443d1d333e3695733fd70e81ee0d87fa41e78aa81844103d2a8a854b0d593"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.2"
flutter_blue_plus_platform_interface:
@@ -211,7 +211,7 @@ packages:
description:
name: flutter_blue_plus_platform_interface
sha256: a4bb70fa6fd09e0be163b004d773bf19e31104e257a4eb846b67f884ddd87de2
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "4.0.2"
flutter_blue_plus_web:
@@ -219,7 +219,7 @@ packages:
description:
name: flutter_blue_plus_web
sha256: "03023c259dbbba1bc5ce0fcd4e88b364f43eec01d45425f393023b9b2722cf4d"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.1"
flutter_launcher_icons:
@@ -227,7 +227,7 @@ packages:
description:
name: flutter_launcher_icons
sha256: "526faf84284b86a4cb36d20a5e45147747b7563d921373d4ee0559c54fcdbcea"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.13.1"
flutter_lints:
@@ -235,7 +235,7 @@ packages:
description:
name: flutter_lints
sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.3"
flutter_localizations:
@@ -248,7 +248,7 @@ packages:
description:
name: flutter_radar_chart
sha256: c98b635de2e3f5b0b1300093023845825b616c8e523776a8a3a714c28f23f211
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.2.1"
flutter_shaders:
@@ -256,7 +256,7 @@ packages:
description:
name: flutter_shaders
sha256: "34794acadd8275d971e02df03afee3dee0f98dbfb8c4837082ad0034f612a3e2"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.1.3"
flutter_test:
@@ -274,31 +274,31 @@ packages:
description:
name: go_router
sha256: e1a30a66d734f9e498b1b6522d6a75ded28242bad2359a9158df38a1c30bcf1f
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "10.2.0"
google_fonts:
dependency: "direct main"
description:
name: google_fonts
sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82
url: "https://pub.dev"
sha256: ebc94ed30fd13cefd397cb1658b593f21571f014b7d1197eeb41fb95f05d899a
url: "https://pub.flutter-io.cn"
source: hosted
version: "6.2.1"
version: "6.3.1"
http:
dependency: transitive
description:
name: http
sha256: "2c11f3f94c687ee9bad77c171151672986360b2b001d109814ee7140b2cf261b"
url: "https://pub.dev"
sha256: bb2ce4590bc2667c96f318d68cac1b5a7987ec819351d32b1c987239a815e007
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.4.0"
version: "1.5.0"
http_parser:
dependency: transitive
description:
name: http_parser
sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "4.1.2"
image:
@@ -306,71 +306,71 @@ packages:
description:
name: image
sha256: "4e973fcf4caae1a4be2fa0a13157aa38a8f9cb049db6529aa00b4d71abc4d928"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "4.5.4"
intl:
dependency: "direct main"
description:
name: intl
sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf
url: "https://pub.dev"
sha256: "3df61194eb431efc39c4ceba583b95633a403f46c9fd341e550ce0bfa50e9aa5"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.19.0"
version: "0.20.2"
json_annotation:
dependency: transitive
description:
name: json_annotation
sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "4.9.0"
leak_tracker:
dependency: transitive
description:
name: leak_tracker
sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec
url: "https://pub.dev"
sha256: "8dcda04c3fc16c14f48a7bb586d4be1f0d1572731b6d81d51772ef47c02081e0"
url: "https://pub.flutter-io.cn"
source: hosted
version: "10.0.8"
version: "11.0.1"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
url: "https://pub.dev"
sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.9"
version: "3.0.10"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
url: "https://pub.dev"
sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1"
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.1"
version: "3.0.2"
lints:
dependency: transitive
description:
name: lints
sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.1"
logger:
dependency: "direct main"
description:
name: logger
sha256: be4b23575aac7ebf01f225a241eb7f6b5641eeaf43c6a8613510fc2f8cf187d1
url: "https://pub.dev"
sha256: "55d6c23a6c15db14920e037fe7e0dc32e7cdaf3b64b4b25df2d541b5b6b81c0c"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.5.0"
version: "2.6.1"
logging:
dependency: transitive
description:
name: logging
sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.0"
lottie:
@@ -378,7 +378,7 @@ packages:
description:
name: lottie
sha256: c5fa04a80a620066c15cf19cc44773e19e9b38e989ff23ea32e5903ef1015950
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.3.1"
matcher:
@@ -386,7 +386,7 @@ packages:
description:
name: matcher
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.12.17"
material_color_utilities:
@@ -394,7 +394,7 @@ packages:
description:
name: material_color_utilities
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.11.1"
meta:
@@ -402,15 +402,23 @@ packages:
description:
name: meta
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.16.0"
mime:
dependency: transitive
description:
name: mime
sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.0"
nested:
dependency: transitive
description:
name: nested
sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.0"
path:
@@ -418,7 +426,7 @@ packages:
description:
name: path
sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.9.1"
path_provider:
@@ -426,31 +434,31 @@ packages:
description:
name: path_provider
sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.5"
path_provider_android:
dependency: transitive
description:
name: path_provider_android
sha256: d0d310befe2c8ab9e7f393288ccbb11b60c019c6b5afc21973eeee4dda2b35e9
url: "https://pub.dev"
sha256: "993381400e94d18469750e5b9dcb8206f15bc09f9da86b9e44a9b0092a0066db"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.2.17"
version: "2.2.18"
path_provider_foundation:
dependency: transitive
description:
name: path_provider_foundation
sha256: "4843174df4d288f5e29185bd6e72a6fbdf5a4a4602717eed565497429f179942"
url: "https://pub.dev"
sha256: "16eef174aacb07e09c351502740fa6254c165757638eba1e9116b0a781201bbd"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.4.1"
version: "2.4.2"
path_provider_linux:
dependency: transitive
description:
name: path_provider_linux
sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.2.1"
path_provider_platform_interface:
@@ -458,7 +466,7 @@ packages:
description:
name: path_provider_platform_interface
sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.2"
path_provider_windows:
@@ -466,7 +474,7 @@ packages:
description:
name: path_provider_windows
sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.3.0"
permission_handler:
@@ -474,7 +482,7 @@ packages:
description:
name: permission_handler
sha256: "59adad729136f01ea9e35a48f5d1395e25cba6cea552249ddbe9cf950f5d7849"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "11.4.0"
permission_handler_android:
@@ -482,7 +490,7 @@ packages:
description:
name: permission_handler_android
sha256: d3971dcdd76182a0c198c096b5db2f0884b0d4196723d21a866fc4cdea057ebc
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "12.1.0"
permission_handler_apple:
@@ -490,7 +498,7 @@ packages:
description:
name: permission_handler_apple
sha256: f000131e755c54cf4d84a5d8bd6e4149e262cc31c5a8b1d698de1ac85fa41023
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "9.4.7"
permission_handler_html:
@@ -498,7 +506,7 @@ packages:
description:
name: permission_handler_html
sha256: "38f000e83355abb3392140f6bc3030660cfaef189e1f87824facb76300b4ff24"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.1.3+5"
permission_handler_platform_interface:
@@ -506,7 +514,7 @@ packages:
description:
name: permission_handler_platform_interface
sha256: eb99b295153abce5d683cac8c02e22faab63e50679b937fa1bf67d58bb282878
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "4.3.0"
permission_handler_windows:
@@ -514,23 +522,23 @@ packages:
description:
name: permission_handler_windows
sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.2.1"
petitparser:
dependency: transitive
description:
name: petitparser
sha256: "07c8f0b1913bcde1ff0d26e57ace2f3012ccbf2b204e070290dad3bb22797646"
url: "https://pub.dev"
sha256: "1a97266a94f7350d30ae522c0af07890c70b8e62c71e8e3920d1db4d23c057d1"
url: "https://pub.flutter-io.cn"
source: hosted
version: "6.1.0"
version: "7.0.1"
platform:
dependency: transitive
description:
name: platform
sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.1.6"
plugin_platform_interface:
@@ -538,31 +546,31 @@ packages:
description:
name: plugin_platform_interface
sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.8"
posix:
dependency: transitive
description:
name: posix
sha256: f0d7856b6ca1887cfa6d1d394056a296ae33489db914e365e2044fdada449e62
url: "https://pub.dev"
sha256: "6323a5b0fa688b6a010df4905a56b00181479e6d10534cecfecede2aa55add61"
url: "https://pub.flutter-io.cn"
source: hosted
version: "6.0.2"
version: "6.0.3"
provider:
dependency: "direct main"
description:
name: provider
sha256: "4abbd070a04e9ddc287673bf5a030c7ca8b685ff70218720abab8b092f53dd84"
url: "https://pub.dev"
sha256: "4e82183fa20e5ca25703ead7e05de9e4cceed1fbd1eadc1ac3cb6f565a09f272"
url: "https://pub.flutter-io.cn"
source: hosted
version: "6.1.5"
version: "6.1.5+1"
rxdart:
dependency: transitive
description:
name: rxdart
sha256: "5c3004a4a8dbb94bd4bf5412a4def4acdaa12e12f269737a5751369e12d1a962"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.28.0"
shared_preferences:
@@ -570,23 +578,23 @@ packages:
description:
name: shared_preferences
sha256: "6e8bf70b7fef813df4e9a36f658ac46d107db4b4cfe1048b477d4e453a8159f5"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.5.3"
shared_preferences_android:
dependency: transitive
description:
name: shared_preferences_android
sha256: "20cbd561f743a342c76c151d6ddb93a9ce6005751e7aa458baad3858bfbfb6ac"
url: "https://pub.dev"
sha256: a2608114b1ffdcbc9c120eb71a0e207c71da56202852d4aab8a5e30a82269e74
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.4.10"
version: "2.4.12"
shared_preferences_foundation:
dependency: transitive
description:
name: shared_preferences_foundation
sha256: "6a52cfcdaeac77cad8c97b539ff688ccfc458c007b4db12be584fbe5c0e49e03"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.5.4"
shared_preferences_linux:
@@ -594,7 +602,7 @@ packages:
description:
name: shared_preferences_linux
sha256: "580abfd40f415611503cae30adf626e6656dfb2f0cee8f465ece7b6defb40f2f"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.4.1"
shared_preferences_platform_interface:
@@ -602,7 +610,7 @@ packages:
description:
name: shared_preferences_platform_interface
sha256: "57cbf196c486bc2cf1f02b85784932c6094376284b3ad5779d1b1c6c6a816b80"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.4.1"
shared_preferences_web:
@@ -610,7 +618,7 @@ packages:
description:
name: shared_preferences_web
sha256: c49bd060261c9a3f0ff445892695d6212ff603ef3115edbb448509d407600019
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.4.3"
shared_preferences_windows:
@@ -618,7 +626,7 @@ packages:
description:
name: shared_preferences_windows
sha256: "94ef0f72b2d71bc3e700e025db3710911bd51a71cefb65cc609dd0d9a982e3c1"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.4.1"
sky_engine:
@@ -631,7 +639,7 @@ packages:
description:
name: source_span
sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.10.1"
stack_trace:
@@ -639,7 +647,7 @@ packages:
description:
name: stack_trace
sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.12.1"
stream_channel:
@@ -647,7 +655,7 @@ packages:
description:
name: stream_channel
sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.4"
string_scanner:
@@ -655,7 +663,7 @@ packages:
description:
name: string_scanner
sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.4.1"
term_glyph:
@@ -663,47 +671,47 @@ packages:
description:
name: term_glyph
sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.2.2"
test_api:
dependency: transitive
description:
name: test_api
sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
url: "https://pub.dev"
sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.7.4"
version: "0.7.6"
typed_data:
dependency: transitive
description:
name: typed_data
sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.4.0"
vector_math:
dependency: transitive
description:
name: vector_math
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
url: "https://pub.dev"
sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.4"
version: "2.2.0"
vm_service:
dependency: transitive
description:
name: vm_service
sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14"
url: "https://pub.dev"
sha256: "45caa6c5917fa127b5dbcfbd1fa60b14e583afdc08bfc96dda38886ca252eb60"
url: "https://pub.flutter-io.cn"
source: hosted
version: "14.3.1"
version: "15.0.2"
web:
dependency: transitive
description:
name: web
sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.1"
webview_flutter:
@@ -711,57 +719,57 @@ packages:
description:
name: webview_flutter
sha256: c3e4fe614b1c814950ad07186007eff2f2e5dd2935eba7b9a9a1af8e5885f1ba
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "4.13.0"
webview_flutter_android:
dependency: transitive
description:
name: webview_flutter_android
sha256: f6e6afef6e234801da77170f7a1847ded8450778caf2fe13979d140484be3678
url: "https://pub.dev"
sha256: "9a25f6b4313978ba1c2cda03a242eea17848174912cfb4d2d8ee84a556f248e3"
url: "https://pub.flutter-io.cn"
source: hosted
version: "4.7.0"
version: "4.10.1"
webview_flutter_platform_interface:
dependency: transitive
description:
name: webview_flutter_platform_interface
sha256: f0dc2dc3a2b1e3a6abdd6801b9355ebfeb3b8f6cde6b9dc7c9235909c4a1f147
url: "https://pub.dev"
sha256: "63d26ee3aca7256a83ccb576a50272edd7cfc80573a4305caa98985feb493ee0"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.13.1"
version: "2.14.0"
webview_flutter_wkwebview:
dependency: transitive
description:
name: webview_flutter_wkwebview
sha256: a3d461fe3467014e05f3ac4962e5fdde2a4bf44c561cb53e9ae5c586600fdbc3
url: "https://pub.dev"
sha256: fb46db8216131a3e55bcf44040ca808423539bc6732e7ed34fb6d8044e3d512f
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.22.0"
version: "3.23.0"
xdg_directories:
dependency: transitive
description:
name: xdg_directories
sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
xml:
dependency: transitive
description:
name: xml
sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226
url: "https://pub.dev"
sha256: "971043b3a0d3da28727e40ed3e0b5d18b742fa5a68665cca88e74b7876d5e025"
url: "https://pub.flutter-io.cn"
source: hosted
version: "6.5.0"
version: "6.6.1"
yaml:
dependency: transitive
description:
name: yaml
sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.1.3"
sdks:
dart: ">=3.7.0 <4.0.0"
flutter: ">=3.27.0"
dart: ">=3.8.0 <4.0.0"
flutter: ">=3.29.0"
+1 -1
View File
@@ -69,7 +69,7 @@ dependencies:
google_fonts: ^6.1.0
# 本地化
intl: ^0.19.0
intl: ^0.20.2
# 本地化
flutter_localizations: