修复部分语言中文

This commit is contained in:
wyf
2026-03-27 15:42:52 +08:00
parent a1e835ecbc
commit 446d884ac2
13 changed files with 192 additions and 692 deletions

View File

@@ -4,7 +4,6 @@ import 'package:flutterflow_ui/flutterflow_ui.dart';
import 'package:vbvs_app/common/color/appConstants.dart';
import 'package:vbvs_app/common/util/FitTool.dart';
import 'package:vbvs_app/common/util/MyUtils.dart';
import 'package:vbvs_app/component/NullDataComponentWidget.dart';
import 'package:vbvs_app/component/tool/NewTopSlideNotification.dart';
import 'package:vbvs_app/controller/date/CalendarController.dart';
import 'package:vbvs_app/controller/sleep/sleep_report_controller.dart';
@@ -56,6 +55,75 @@ class _QuickHealthReportPageState extends State<QuickHealthReportPage> {
double lineWidth = 150.rpx;
try {
if (widget.data == null || widget.data.isEmpty) {
return LayoutBuilder(
builder: (context, bodySize) => GestureDetector(
child: Container(
decoration: BoxDecoration(
image: (widget.data['noBackImg'] != null &&
widget.data['noBackImg'] == true)
? null // ✅ 不要背景图
: DecorationImage(
image: (widget.data['backgroundImg'] != null &&
widget.data['backgroundImg']
.toString()
.isNotEmpty)
? AssetImage(widget.data['backgroundImg'])
: AssetImage(getBackgroundImageNoImage())
as ImageProvider,
fit: BoxFit.fill,
),
),
child: Scaffold(
backgroundColor: Colors.transparent, // 背景透明
appBar: (widget.data['arrow'] != null &&
widget.data['arrow'] == false)
? null
: AppBar(
backgroundColor: widget.data['backgroundColor'] != null
? widget.data['backgroundColor'].withOpacity(0.8)
: themeController.currentColor.sc5,
automaticallyImplyLeading: false,
iconTheme: IconThemeData(
color: themeController.currentColor.sc3),
titleSpacing: 0,
title: Container(
width: double.infinity,
height: 180.rpx,
child: Stack(
alignment: Alignment.center,
children: [
/// 居中标题
Text(
'快检报告'.tr,
style: TextStyle(
fontFamily: 'Readex Pro',
color: themeController.currentColor.sc3,
letterSpacing: 0,
fontSize: 30.rpx,
),
),
/// 左边返回按钮
if (widget.data['arrow'] == null ||
widget.data['arrow'] == true)
Positioned(
left: 0,
child: returnIconButtomNew(),
),
],
),
),
),
body: SafeArea(
top: true,
child: Text('无数据'.tr),
),
),
),
),
);
}
return LayoutBuilder(
builder: (context, bodySize) => GestureDetector(
child: Container(
@@ -384,7 +452,73 @@ class _QuickHealthReportPageState extends State<QuickHealthReportPage> {
text: '页面渲染失败:${e.toString()}'.tr,
textColor: themeController.currentColor.sc9,
);
return Container();
return LayoutBuilder(
builder: (context, bodySize) => GestureDetector(
child: Container(
decoration: BoxDecoration(
image: (widget.data['noBackImg'] != null &&
widget.data['noBackImg'] == true)
? null // ✅ 不要背景图
: DecorationImage(
image: (widget.data['backgroundImg'] != null &&
widget.data['backgroundImg']
.toString()
.isNotEmpty)
? AssetImage(widget.data['backgroundImg'])
: AssetImage(getBackgroundImageNoImage())
as ImageProvider,
fit: BoxFit.fill,
),
),
child: Scaffold(
backgroundColor: Colors.transparent, // 背景透明
appBar: (widget.data['arrow'] != null &&
widget.data['arrow'] == false)
? null
: AppBar(
backgroundColor: widget.data['backgroundColor'] != null
? widget.data['backgroundColor'].withOpacity(0.8)
: themeController.currentColor.sc5,
automaticallyImplyLeading: false,
iconTheme: IconThemeData(
color: themeController.currentColor.sc3),
titleSpacing: 0,
title: Container(
width: double.infinity,
height: 180.rpx,
child: Stack(
alignment: Alignment.center,
children: [
/// 居中标题
Text(
'快检报告'.tr,
style: TextStyle(
fontFamily: 'Readex Pro',
color: themeController.currentColor.sc3,
letterSpacing: 0,
fontSize: 30.rpx,
),
),
/// 左边返回按钮
if (widget.data['arrow'] == null ||
widget.data['arrow'] == true)
Positioned(
left: 0,
child: returnIconButtomNew(),
),
],
),
),
),
body: SafeArea(
top: true,
child: Text('页面渲染失败:${e.toString()}'),
),
),
),
),
);
}
}