From 2911bfb84ca96639dbf668a537e96317afedafa0 Mon Sep 17 00:00:00 2001 From: Simon Friis Vindum Date: Tue, 6 Feb 2024 22:26:52 +0100 Subject: [PATCH] Make destructiveRed a CupertinoDynamicColor (#141364) `destructiveRed` is an alias for `systemRed`, but, in the definition, the precise type information is lost. This PR gives `destructiveRed` the type `CupertinoDynamicColor` (and not the superclass `Color`) like all the other colors defined in this file. --- packages/flutter/lib/src/cupertino/colors.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter/lib/src/cupertino/colors.dart b/packages/flutter/lib/src/cupertino/colors.dart index e103a14c0e..b54e96b691 100644 --- a/packages/flutter/lib/src/cupertino/colors.dart +++ b/packages/flutter/lib/src/cupertino/colors.dart @@ -110,7 +110,7 @@ abstract final class CupertinoColors { /// or the foreground red theme in various native apps such as HealthKit. /// /// This is SystemRed in the iOS palette. - static const Color destructiveRed = systemRed; + static const CupertinoDynamicColor destructiveRed = systemRed; /// A blue color that can adapt to the given [BuildContext]. ///