|
|
|
import 'package:doublefeel_flutter/app/utils/assets_helper.dart';
|
|
|
|
import 'package:doublefeel_flutter/app/utils/platform_compact.dart';
|
|
|
|
import 'package:doublefeel_flutter/core/services/thinking_data_service.dart';
|
|
|
|
import 'package:doublefeel_flutter/core/theme/app_theme.dart';
|
|
|
|
import 'package:doublefeel_flutter/l10n/l10n_extensions.dart';
|
|
...
|
...
|
@@ -119,7 +120,7 @@ class _HrvInstructionCard extends StatelessWidget { |
|
|
|
alignment: Alignment.topCenter,
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
constraints: const BoxConstraints(minHeight: 438),
|
|
|
|
constraints: BoxConstraints(minHeight: isOhos() ? 388 : 438),
|
|
|
|
margin: const EdgeInsets.only(top: 110),
|
|
|
|
padding: const EdgeInsets.fromLTRB(20, 78, 20, 20),
|
|
|
|
decoration: BoxDecoration(
|
|
...
|
...
|
@@ -128,47 +129,97 @@ class _HrvInstructionCard extends StatelessWidget { |
|
|
|
),
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
l10n.todayHrvMeasurementIntro,
|
|
|
|
style: TextStyle(
|
|
|
|
color: context.colors.textSecondary,
|
|
|
|
fontSize: 13,
|
|
|
|
height: 17 / 12,
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
const SizedBox(height: 18),
|
|
|
|
_InstructionStep(text: l10n.todayHrvMeasurementStep1),
|
|
|
|
const SizedBox(height: 8),
|
|
|
|
_InstructionStep(text: l10n.todayHrvMeasurementStep2),
|
|
|
|
const SizedBox(height: 8),
|
|
|
|
_InstructionStep(text: l10n.todayHrvMeasurementStep3),
|
|
|
|
const SizedBox(height: 8),
|
|
|
|
_InstructionStep(text: l10n.todayHrvMeasurementStep4),
|
|
|
|
const SizedBox(height: 8),
|
|
|
|
_InstructionStep(text: l10n.todayHrvMeasurementStep5),
|
|
|
|
const SizedBox(height: 16),
|
|
|
|
Text(
|
|
|
|
l10n.todayHrvMeasurementHint,
|
|
|
|
style: TextStyle(
|
|
|
|
color: context.colors.textSecondary,
|
|
|
|
fontSize: 13,
|
|
|
|
height: 17 / 12,
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
const SizedBox(height: 8),
|
|
|
|
Text(
|
|
|
|
l10n.todayHrvMeasurementWarning,
|
|
|
|
style: TextStyle(
|
|
|
|
color: context.colors.warning,
|
|
|
|
fontSize: 13,
|
|
|
|
height: 17 / 12,
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
children: isOhos()
|
|
|
|
? [
|
|
|
|
Center(
|
|
|
|
child: Text(
|
|
|
|
'操作步骤',
|
|
|
|
style: TextStyle(
|
|
|
|
color: const Color(0xFF0F0F11),
|
|
|
|
fontSize: 16,
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(height: 20),
|
|
|
|
Text(
|
|
|
|
'华为手表通常会在一天中自动更新压力和 HRV 数据。如果你希望立即手动触发一次新的测量,可以参考以下方法:',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 12,
|
|
|
|
fontFamily: 'HarmonyOS Sans SC',
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
color: context.colors.textSecondary,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
const SizedBox(height: 12),
|
|
|
|
_InstructionStep(text: '1、戴紧智能手表,坐下来,保持心境平和'),
|
|
|
|
const SizedBox(height: 12),
|
|
|
|
_InstructionStep(
|
|
|
|
text:
|
|
|
|
'2、在手机上打开华为运动健康,在健康页下滑找到“情绪健康”板块,进入后点击最下方的“测量压力”'),
|
|
|
|
const SizedBox(height: 12),
|
|
|
|
_InstructionStep(text: '3、保持平稳的呼吸,等待1-3分钟'),
|
|
|
|
const SizedBox(height: 16),
|
|
|
|
Text(
|
|
|
|
'提示:数据源来自华为运动健康,在测量之后可能存在延迟或是数据未能同步的情况。如若出现上述情况,请重新测量并等待数据读取。',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 12,
|
|
|
|
fontFamily: 'HarmonyOS Sans SC',
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
color: context.colors.textSecondary,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
const SizedBox(height: 16),
|
|
|
|
Text(
|
|
|
|
'注意:需打开健康里的权限,同时关闭省电模式。',
|
|
|
|
style: TextStyle(
|
|
|
|
color: context.colors.warning,
|
|
|
|
fontSize: 12,
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
),
|
|
|
|
)
|
|
|
|
]
|
|
|
|
: [
|
|
|
|
Text(
|
|
|
|
l10n.todayHrvMeasurementIntro,
|
|
|
|
style: TextStyle(
|
|
|
|
color: context.colors.textSecondary,
|
|
|
|
fontSize: 13,
|
|
|
|
height: 17 / 12,
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
const SizedBox(height: 18),
|
|
|
|
_InstructionStep(text: l10n.todayHrvMeasurementStep1),
|
|
|
|
const SizedBox(height: 8),
|
|
|
|
_InstructionStep(text: l10n.todayHrvMeasurementStep2),
|
|
|
|
const SizedBox(height: 8),
|
|
|
|
_InstructionStep(text: l10n.todayHrvMeasurementStep3),
|
|
|
|
const SizedBox(height: 8),
|
|
|
|
_InstructionStep(text: l10n.todayHrvMeasurementStep4),
|
|
|
|
const SizedBox(height: 8),
|
|
|
|
_InstructionStep(text: l10n.todayHrvMeasurementStep5),
|
|
|
|
const SizedBox(height: 16),
|
|
|
|
Text(
|
|
|
|
l10n.todayHrvMeasurementHint,
|
|
|
|
style: TextStyle(
|
|
|
|
color: context.colors.textSecondary,
|
|
|
|
fontSize: 13,
|
|
|
|
height: 17 / 12,
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
const SizedBox(height: 8),
|
|
|
|
Text(
|
|
|
|
l10n.todayHrvMeasurementWarning,
|
|
|
|
style: TextStyle(
|
|
|
|
color: context.colors.warning,
|
|
|
|
fontSize: 13,
|
|
|
|
height: 17 / 12,
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Image.asset(
|
...
|
...
|
|