From 0c96ef723f1981e13337959e7f0be74b95bf5066 Mon Sep 17 00:00:00 2001 From: jackm Date: Sun, 5 Jan 2025 03:33:31 +0800 Subject: [PATCH] remove usage of deprecated `withOpacity` function From the Flutter migration guide: https://docs.flutter.dev/release/breaking-changes/wide-gamut-framework#opacity the usage of the `withOpacity` function will be removed in favor of floating point --- bitsdojo_window/lib/src/widgets/window_button.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitsdojo_window/lib/src/widgets/window_button.dart b/bitsdojo_window/lib/src/widgets/window_button.dart index 11cc43f..0ab3f20 100644 --- a/bitsdojo_window/lib/src/widgets/window_button.dart +++ b/bitsdojo_window/lib/src/widgets/window_button.dart @@ -113,7 +113,7 @@ class WindowButton extends StatelessWidget { (appWindow.titleBarHeight - borderSize) / 3 - (borderSize / 2); // Used when buttonContext.backgroundColor is null, allowing the AnimatedContainer to fade-out smoothly. var fadeOutColor = - getBackgroundColor(MouseState()..isMouseOver = true).withOpacity(0); + getBackgroundColor(MouseState()..isMouseOver = true).withAlpha(0); var padding = this.padding ?? EdgeInsets.all(defaultPadding); var animationMs = mouseState.isMouseOver ? (animate ? 100 : 0) : (animate ? 200 : 0);