更新顶部系统状态栏颜色
This commit is contained in:
@@ -89,6 +89,11 @@ class _EPageState extends State<PersonPage> {
|
||||
resizeToAvoidBottomInset: false,
|
||||
backgroundColor: Colors.transparent, // 加上这一行
|
||||
appBar: AppBar(
|
||||
systemOverlayStyle: SystemUiOverlayStyle(
|
||||
statusBarColor: Colors.transparent, // 状态栏背景色
|
||||
statusBarIconBrightness: Brightness.light, // 图标颜色(Android)
|
||||
statusBarBrightness: Brightness.light, // 图标颜色(iOS)
|
||||
),
|
||||
backgroundColor: themeController.currentColor.sc5,
|
||||
automaticallyImplyLeading: false,
|
||||
iconTheme: IconThemeData(
|
||||
|
||||
@@ -1138,6 +1138,7 @@ Future<void> showIntervalPickerDialog(
|
||||
context,
|
||||
values,
|
||||
tempIndex,
|
||||
|
||||
/// → 替换显示文本(核心)
|
||||
customDisplay: (val) => formatValue(val),
|
||||
),
|
||||
@@ -1156,7 +1157,6 @@ Future<void> showIntervalPickerDialog(
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Future<void> showCountryCodePickerDialog(
|
||||
BuildContext context, {
|
||||
required String initialCode, // 初始区号,如 "+86"
|
||||
@@ -1168,8 +1168,7 @@ Future<void> showCountryCodePickerDialog(
|
||||
|
||||
final List<Map<String, String>> list = controller.country_code;
|
||||
|
||||
int selectedIndex =
|
||||
list.indexWhere((e) => e["id"] == initialCode);
|
||||
int selectedIndex = list.indexWhere((e) => e["id"] == initialCode);
|
||||
if (selectedIndex < 0) selectedIndex = 0;
|
||||
|
||||
final RxInt tempIndex = RxInt(selectedIndex);
|
||||
@@ -1199,8 +1198,7 @@ Future<void> showCountryCodePickerDialog(
|
||||
children: [
|
||||
/// 顶部栏
|
||||
Container(
|
||||
padding:
|
||||
EdgeInsets.symmetric(horizontal: 30.rpx),
|
||||
padding: EdgeInsets.symmetric(horizontal: 30.rpx),
|
||||
color: themeController.currentColor.sc5,
|
||||
height: 80.rpx,
|
||||
child: Row(
|
||||
@@ -1210,15 +1208,14 @@ Future<void> showCountryCodePickerDialog(
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: Get.back,
|
||||
padding: EdgeInsets.all(0),
|
||||
padding: EdgeInsets.all(0),
|
||||
child: SizedBox(
|
||||
width: 110.rpx,
|
||||
height: 60.rpx,
|
||||
child: Center(
|
||||
child: Text(
|
||||
"取消".tr,
|
||||
style: const TextStyle(
|
||||
color: Colors.white),
|
||||
style: const TextStyle(color: Colors.white),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1227,18 +1224,16 @@ Future<void> showCountryCodePickerDialog(
|
||||
title.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color:
|
||||
themeController.currentColor.sc3,
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
ClickableContainer(
|
||||
padding: EdgeInsets.all(0),
|
||||
padding: EdgeInsets.all(0),
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () {
|
||||
onConfirm(
|
||||
list[tempIndex.value]["id"]!);
|
||||
onConfirm(list[tempIndex.value]["id"]!);
|
||||
Get.back();
|
||||
},
|
||||
child: SizedBox(
|
||||
@@ -1248,8 +1243,7 @@ Future<void> showCountryCodePickerDialog(
|
||||
child: Text(
|
||||
"确定".tr,
|
||||
style: TextStyle(
|
||||
color: themeController
|
||||
.currentColor.sc2,
|
||||
color: themeController.currentColor.sc2,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1269,14 +1263,11 @@ Future<void> showCountryCodePickerDialog(
|
||||
child: Center(
|
||||
child: Container(
|
||||
height: 90.rpx,
|
||||
margin: EdgeInsets.symmetric(
|
||||
horizontal: 95.rpx),
|
||||
margin:
|
||||
EdgeInsets.symmetric(horizontal: 95.rpx),
|
||||
decoration: BoxDecoration(
|
||||
color: themeController
|
||||
.currentColor.sc2,
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
16.rpx),
|
||||
color: themeController.currentColor.sc2,
|
||||
borderRadius: BorderRadius.circular(16.rpx),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1287,8 +1278,8 @@ Future<void> showCountryCodePickerDialog(
|
||||
child: getOnePickers(
|
||||
context,
|
||||
list
|
||||
.map((e) =>
|
||||
"${e['name']}".tr+"(${e['id']})")
|
||||
.map(
|
||||
(e) => "${e['name']}".tr + "(${e['id']})")
|
||||
.toList(),
|
||||
tempIndex,
|
||||
),
|
||||
@@ -1307,7 +1298,6 @@ Future<void> showCountryCodePickerDialog(
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Future<void> showTimeZonePickerDialog(
|
||||
BuildContext context, {
|
||||
required String initialTimeZone, // 初始时区字符串,如 "UTC+8"
|
||||
@@ -1317,7 +1307,7 @@ Future<void> showTimeZonePickerDialog(
|
||||
// 使用 AppConstants.integerTimeZones 作为数据源
|
||||
List<String> timeZones = AppConstants.integerTimeZones;
|
||||
int selectedIndex = timeZones.indexOf(initialTimeZone);
|
||||
|
||||
|
||||
// 如果没有找到,使用默认的UTC+8(北京时间)
|
||||
if (selectedIndex == -1) {
|
||||
selectedIndex = timeZones.indexOf("UTC+8");
|
||||
@@ -1325,10 +1315,10 @@ Future<void> showTimeZonePickerDialog(
|
||||
selectedIndex = 0; // 如果连UTC+8都没有,使用第一个
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
final RxInt tempIndex = RxInt(selectedIndex);
|
||||
ThemeController themeController = Get.find();
|
||||
|
||||
|
||||
await showDialog(
|
||||
context: context,
|
||||
barrierDismissible: true,
|
||||
@@ -1452,4 +1442,3 @@ Future<void> showTimeZonePickerDialog(
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -77,6 +77,11 @@ class _UpdatePageState extends State<UpdatePersonPage> {
|
||||
resizeToAvoidBottomInset: false,
|
||||
backgroundColor: Colors.transparent, // 加上这一行
|
||||
appBar: AppBar(
|
||||
systemOverlayStyle: SystemUiOverlayStyle(
|
||||
statusBarColor: Colors.transparent, // 状态栏背景色
|
||||
statusBarIconBrightness: Brightness.light, // 图标颜色(Android)
|
||||
statusBarBrightness: Brightness.light, // 图标颜色(iOS)
|
||||
),
|
||||
backgroundColor: themeController.currentColor.sc5,
|
||||
automaticallyImplyLeading: false,
|
||||
iconTheme: IconThemeData(
|
||||
|
||||
Reference in New Issue
Block a user