更新打鼾图显示
This commit is contained in:
@@ -42,11 +42,13 @@ class CitySelectionColors {
|
||||
final Color? pickerBackgroundColor; // 选择器整体背景色
|
||||
final Color? confirmTextColor; // 确定按钮文字颜色
|
||||
final Color? selectedCityColor; // 选中的城市背景色
|
||||
final Color? selectedTextColor; // 选中的文字颜色
|
||||
|
||||
const CitySelectionColors({
|
||||
this.pickerBackgroundColor,
|
||||
this.confirmTextColor,
|
||||
this.selectedCityColor,
|
||||
this.selectedTextColor,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -68,6 +70,8 @@ Future showCitySelectionDialog(
|
||||
colors?.confirmTextColor ?? themeController.currentColor.sc2;
|
||||
final Color selectedCityColor =
|
||||
colors?.selectedCityColor ?? themeController.currentColor.sc2;
|
||||
final Color selectedTextColor =
|
||||
colors?.selectedTextColor ?? themeController.currentColor.sc1; // 默认使用主题颜色
|
||||
|
||||
final RxList<String> countries = <String>[].obs;
|
||||
final RxList<String> provinces = <String>[].obs;
|
||||
@@ -300,6 +304,7 @@ Future showCitySelectionDialog(
|
||||
pickerBackgroundColor: pickerBackgroundColor,
|
||||
confirmTextColor: confirmTextColor,
|
||||
selectedCityColor: selectedCityColor,
|
||||
selectedTextColor: selectedTextColor,
|
||||
countries: countries,
|
||||
provinces: provinces,
|
||||
cities: cities,
|
||||
@@ -388,6 +393,7 @@ Widget _buildCityPickerContent(
|
||||
required Color pickerBackgroundColor,
|
||||
required Color confirmTextColor,
|
||||
required Color selectedCityColor,
|
||||
required Color selectedTextColor,
|
||||
required RxList<String> countries,
|
||||
required RxList<String> provinces,
|
||||
required RxList<String> cities,
|
||||
@@ -664,7 +670,8 @@ Widget _buildCityPickerContent(
|
||||
unit: "",
|
||||
onChanged: (_) => updateProvinces(),
|
||||
pickerKey: ValueKey(
|
||||
'country_${DateTime.now().millisecondsSinceEpoch}'), // 添加动态 key
|
||||
'country_${DateTime.now().millisecondsSinceEpoch}'),
|
||||
selectedColor: selectedTextColor, // 传递选中文字颜色
|
||||
);
|
||||
}),
|
||||
),
|
||||
@@ -681,7 +688,8 @@ Widget _buildCityPickerContent(
|
||||
unit: "",
|
||||
onChanged: (_) => updateCities(),
|
||||
pickerKey: ValueKey(
|
||||
'province_${DateTime.now().millisecondsSinceEpoch}'), // 添加动态 key
|
||||
'province_${DateTime.now().millisecondsSinceEpoch}'),
|
||||
selectedColor: selectedTextColor, // 传递选中文字颜色
|
||||
);
|
||||
}),
|
||||
),
|
||||
@@ -697,7 +705,8 @@ Widget _buildCityPickerContent(
|
||||
cityIndex,
|
||||
unit: "",
|
||||
pickerKey: ValueKey(
|
||||
'city_${DateTime.now().millisecondsSinceEpoch}'), // 添加动态 key
|
||||
'city_${DateTime.now().millisecondsSinceEpoch}'),
|
||||
selectedColor: selectedTextColor, // 传递选中文字颜色
|
||||
);
|
||||
}),
|
||||
),
|
||||
@@ -800,4 +809,4 @@ Widget _buildErrorBottomSheet(
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user