更新同步遥控器
This commit is contained in:
@@ -13,6 +13,7 @@ import 'package:vbvs_app/controller/home/home_controller.dart';
|
||||
import 'package:vbvs_app/controller/sleep/sleep_report_controller.dart';
|
||||
import 'package:vbvs_app/language/AppLanguage.dart';
|
||||
import 'package:vbvs_app/pages/common/selectDialog.dart';
|
||||
import 'package:vbvs_app/pages/main_bottom/component/main_page_b_bottom_change.dart';
|
||||
import 'package:vbvs_app/pages/sleep_report/component/AIAdviceWidget.dart';
|
||||
import 'package:vbvs_app/pages/sleep_report/component/BreatheCard.dart';
|
||||
import 'package:vbvs_app/pages/sleep_report/component/BreathePauseNewWidget.dart';
|
||||
@@ -91,8 +92,16 @@ class _NewSleepReportPageState extends State<NewSleepReportPage> {
|
||||
_scrollToTargetComponent(sleepReportController.sleepReport);
|
||||
},
|
||||
onFailure: (res) {
|
||||
TopSlideNotification.show(context,
|
||||
text: res.msg!, textColor: themeController.currentColor.sc9);
|
||||
if (MainPageBBottomChange.getCurrentIndex() != null) {
|
||||
if (MainPageBBottomChange.getCurrentIndex() == 1) {
|
||||
TopSlideNotification.show(context,
|
||||
text: res.msg!, textColor: themeController.currentColor.sc9);
|
||||
}
|
||||
} else {
|
||||
TopSlideNotification.show(context,
|
||||
text: res.msg!, textColor: themeController.currentColor.sc9);
|
||||
}
|
||||
|
||||
sleepReportController.sleepReport.value = {};
|
||||
sleepReportController.updateAll();
|
||||
print(res);
|
||||
@@ -149,15 +158,28 @@ class _NewSleepReportPageState extends State<NewSleepReportPage> {
|
||||
builder: (context, bodySize) => GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
child: Container(
|
||||
// decoration: BoxDecoration(
|
||||
// image: DecorationImage(
|
||||
// image: (widget.data['backgroundImg'] != null &&
|
||||
// widget.data['backgroundImg'].toString().isNotEmpty)
|
||||
// ? AssetImage(widget.data['backgroundImg'])
|
||||
// : AssetImage('assets/img/bgNoImg.png') as ImageProvider,
|
||||
// fit: BoxFit.fill,
|
||||
// ),
|
||||
// ),
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: (widget.data['backgroundImg'] != null &&
|
||||
widget.data['backgroundImg'].toString().isNotEmpty)
|
||||
? AssetImage(widget.data['backgroundImg'])
|
||||
: AssetImage('assets/img/bgNoImg.png') as ImageProvider,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
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('assets/img/bgNoImg.png') as ImageProvider,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
),
|
||||
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent, // 背景透明
|
||||
appBar: AppBar(
|
||||
|
||||
Reference in New Issue
Block a user