diff --git a/pkgs/dartpad_ui/lib/main.dart b/pkgs/dartpad_ui/lib/main.dart index a2b43a540..6cafad01f 100644 --- a/pkgs/dartpad_ui/lib/main.dart +++ b/pkgs/dartpad_ui/lib/main.dart @@ -531,7 +531,7 @@ class LoadingOverlay extends StatelessWidget { final color = theme.colorScheme.surface; return AnimatedContainer( - color: compiling ? color.withOpacity(0.8) : color.withOpacity(0.0), + color: color.withValues(alpha: compiling ? 0.8 : 0), duration: animationDelay, curve: animationCurve, child: compiling diff --git a/pkgs/dartpad_ui/lib/widgets.dart b/pkgs/dartpad_ui/lib/widgets.dart index 7100678cd..b3993d144 100644 --- a/pkgs/dartpad_ui/lib/widgets.dart +++ b/pkgs/dartpad_ui/lib/widgets.dart @@ -109,7 +109,7 @@ class RunButton extends StatelessWidget { backgroundColor: WidgetStateProperty.resolveWith( (states) { if (states.contains(WidgetState.disabled)) { - return runButtonColor.withOpacity(0.4); + return runButtonColor.withValues(alpha: 0.4); } return runButtonColor;