Made Cupertino dialog more like a native dialog in dark mode (#157218)
This PR addresses an issue where the `CupertinoAlertDialog` was not fully visible in dark mode. The dialog now adapts better to dark mode themes, ensuring proper contrast and readability across different UI elements. Fixes: #80921
This commit is contained in:
@@ -611,7 +611,7 @@ abstract final class CupertinoColors {
|
||||
highContrastColor: Color.fromARGB(94, 60, 60, 67),
|
||||
darkHighContrastColor: Color.fromARGB(173, 84, 84, 88),
|
||||
elevatedColor: Color.fromARGB(73, 60, 60, 67),
|
||||
darkElevatedColor: Color.fromARGB(153, 84, 84, 88),
|
||||
darkElevatedColor: Color.fromARGB(153, 210, 210, 210),
|
||||
highContrastElevatedColor: Color.fromARGB(94, 60, 60, 67),
|
||||
darkHighContrastElevatedColor: Color.fromARGB(173, 84, 84, 88),
|
||||
);
|
||||
|
||||
@@ -115,7 +115,7 @@ const double _kActionSheetButtonVerticalPaddingBase = 1.8;
|
||||
// Extracted from https://developer.apple.com/design/resources/.
|
||||
const Color _kDialogColor = CupertinoDynamicColor.withBrightness(
|
||||
color: Color(0xCCF2F2F2),
|
||||
darkColor: Color(0xBF1E1E1E),
|
||||
darkColor: Color(0xCC2D2D2D),
|
||||
);
|
||||
|
||||
// Translucent light gray that is painted on top of the blurred backdrop as the
|
||||
@@ -123,7 +123,7 @@ const Color _kDialogColor = CupertinoDynamicColor.withBrightness(
|
||||
// Eyeballed from iOS 13 beta simulator.
|
||||
const Color _kDialogPressedColor = CupertinoDynamicColor.withBrightness(
|
||||
color: Color(0xFFE1E1E1),
|
||||
darkColor: Color(0xFF2E2E2E),
|
||||
darkColor: Color(0xFF404040),
|
||||
);
|
||||
|
||||
// Translucent light gray that is painted on top of the blurred backdrop as the
|
||||
|
||||
@@ -679,7 +679,7 @@ void main() {
|
||||
|
||||
expect(
|
||||
find.byType(CupertinoAlertDialog),
|
||||
paints..rect(color: const Color(0xBF1E1E1E)),
|
||||
paints..rect(color: const Color(0xCC2D2D2D)),
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user