From fac757d9a0647b424f4ecb1fc9d7f44d3cc7d801 Mon Sep 17 00:00:00 2001 From: neckfire Date: Mon, 13 Jul 2026 09:38:23 +0200 Subject: [PATCH] fix: withOpacity au lieu de withValues (API Flutter 3.24) Co-Authored-By: Claude Opus 4.8 --- lib/screens/login_screen.dart | 2 +- lib/widgets/server_card.dart | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/screens/login_screen.dart b/lib/screens/login_screen.dart index b23063d..0589ca0 100644 --- a/lib/screens/login_screen.dart +++ b/lib/screens/login_screen.dart @@ -42,7 +42,7 @@ class _LoginScreenState extends State { gradient: LinearGradient( begin: Alignment.topLeft, end: Alignment.bottomRight, - colors: [scheme.primary.withValues(alpha: 0.25), scheme.surface], + colors: [scheme.primary.withOpacity(0.25), scheme.surface], ), ), child: SafeArea( diff --git a/lib/widgets/server_card.dart b/lib/widgets/server_card.dart index 380b384..505d34d 100644 --- a/lib/widgets/server_card.dart +++ b/lib/widgets/server_card.dart @@ -51,7 +51,7 @@ class ServerCard extends StatelessWidget { if (server.subtitle != null) Text(server.subtitle!, style: TextStyle( - color: Colors.white.withValues(alpha: 0.75), fontSize: 13)), + color: Colors.white.withOpacity(0.75), fontSize: 13)), ], ), ), @@ -72,7 +72,7 @@ class ServerCard extends StatelessWidget { Expanded( child: Text(server.connect!, style: TextStyle( - color: Colors.white.withValues(alpha: 0.7), + color: Colors.white.withOpacity(0.7), fontFamily: 'monospace', fontSize: 12), maxLines: 1, @@ -113,7 +113,7 @@ class _Icon extends StatelessWidget { } Widget _fallbackBox() => Container( - color: Colors.white.withValues(alpha: 0.15), + color: Colors.white.withOpacity(0.15), child: Icon(fallback, color: Colors.white, size: 28), ); } @@ -129,7 +129,7 @@ class _StatusPill extends StatelessWidget { return Container( padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 5), decoration: BoxDecoration( - color: color.withValues(alpha: 0.22), + color: color.withOpacity(0.22), borderRadius: BorderRadius.circular(999), border: Border.all(color: color, width: 1), ), @@ -156,7 +156,7 @@ class _ToggleButton extends StatelessWidget { return FilledButton.icon( onPressed: busy ? null : onToggle, style: FilledButton.styleFrom( - backgroundColor: up ? Colors.white.withValues(alpha: 0.9) : Colors.white, + backgroundColor: up ? Colors.white.withOpacity(0.9) : Colors.white, foregroundColor: up ? const Color(0xFFB3261E) : const Color(0xFF1B5E20), ), icon: busy