更新顶部系统状态栏颜色

This commit is contained in:
wyf
2026-04-07 14:49:31 +08:00
parent 0ead6eb952
commit 30d7764a10
118 changed files with 897 additions and 246 deletions

View File

@@ -25,6 +25,7 @@ import 'package:vbvs_app/pages/sleep_report/component/DailyDataWidget.dart';
import 'package:vbvs_app/pages/sleep_report/component/MonthDataWidget.dart';
import 'package:vbvs_app/pages/sleep_report/component/WeekDataWidget.dart';
import 'package:flutter/services.dart';
class NewSleepReportPage extends StatefulWidget {
var data;
@@ -160,6 +161,12 @@ class _NewSleepReportPageState extends State<NewSleepReportPage> {
widget.data['arrow'] == false)
? null
: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness:
Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: widget.data['backgroundColor'] != null
? widget.data['backgroundColor'].withOpacity(0.8)
: themeController.currentColor.sc5,

View File

@@ -11,6 +11,7 @@ import 'package:vbvs_app/controller/sleep/sleep_report_controller.dart';
import 'package:vbvs_app/pages/sleep_report/QcReportWidget.dart';
import 'package:vbvs_app/pages/sleep_report/chart/StatusBarWithIndicator.dart';
import 'package:EasyDartModule/EasyDartModule.dart' as edm;
import 'package:flutter/services.dart';
class QuickHealthReportPage extends StatefulWidget {
var data;
@@ -101,55 +102,61 @@ class _QuickHealthReportPageState extends State<QuickHealthReportPage> {
),
child: Scaffold(
backgroundColor: Colors.transparent, // 背景透明
appBar:
(deviceTypeController.currentCq.value['arrow'] != null &&
deviceTypeController.currentCq.value['arrow'] ==
false)
? null
: AppBar(
backgroundColor: deviceTypeController
.currentCq.value['backgroundColor'] !=
null
? deviceTypeController
.currentCq.value['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 (deviceTypeController
.currentCq.value['arrow'] ==
null ||
deviceTypeController
.currentCq.value['arrow'] ==
true)
Positioned(
left: 0,
child: returnIconButtomNew(),
),
],
appBar: (deviceTypeController.currentCq.value['arrow'] !=
null &&
deviceTypeController.currentCq.value['arrow'] ==
false)
? null
: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness:
Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: deviceTypeController
.currentCq.value['backgroundColor'] !=
null
? deviceTypeController
.currentCq.value['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 (deviceTypeController
.currentCq.value['arrow'] ==
null ||
deviceTypeController
.currentCq.value['arrow'] ==
true)
Positioned(
left: 0,
child: returnIconButtomNew(),
),
],
),
),
),
body: SafeArea(
top: true,
child: Center(
@@ -188,55 +195,61 @@ class _QuickHealthReportPageState extends State<QuickHealthReportPage> {
),
child: Scaffold(
backgroundColor: Colors.transparent, // 背景透明
appBar:
(deviceTypeController.currentCq.value['arrow'] != null &&
deviceTypeController.currentCq.value['arrow'] ==
false)
? null
: AppBar(
backgroundColor: deviceTypeController
.currentCq.value['backgroundColor'] !=
null
? deviceTypeController
.currentCq.value['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 (deviceTypeController
.currentCq.value['arrow'] ==
null ||
deviceTypeController
.currentCq.value['arrow'] ==
true)
Positioned(
left: 0,
child: returnIconButtomNew(),
),
],
appBar: (deviceTypeController.currentCq.value['arrow'] !=
null &&
deviceTypeController.currentCq.value['arrow'] ==
false)
? null
: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness:
Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: deviceTypeController
.currentCq.value['backgroundColor'] !=
null
? deviceTypeController
.currentCq.value['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 (deviceTypeController
.currentCq.value['arrow'] ==
null ||
deviceTypeController
.currentCq.value['arrow'] ==
true)
Positioned(
left: 0,
child: returnIconButtomNew(),
),
],
),
),
),
body: SafeArea(
top: true,
child: SingleChildScrollView(
@@ -548,6 +561,12 @@ class _QuickHealthReportPageState extends State<QuickHealthReportPage> {
deviceTypeController.currentCq.value['arrow'] == false)
? null
: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness:
Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: deviceTypeController
.currentCq.value['backgroundColor'] !=
null

View File

@@ -9,6 +9,7 @@ import 'package:vbvs_app/controller/device/device_type_controller.dart';
import 'package:vbvs_app/controller/main_bottom/global_controller.dart';
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
import 'package:vbvs_app/controller/user_info_controller.dart';
import 'package:flutter/services.dart';
class SleepReportPage extends StatefulWidget {
var sleepUri;
@@ -54,6 +55,11 @@ class _SleepReportPageState extends State<SleepReportPage> {
child: Scaffold(
backgroundColor: Colors.transparent, // 背景透明
appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: themeController.currentColor.sc17,
automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: themeController.currentColor.sc3),