Replace deprecated withOpacity and surfaceVariant APIs

Migrate all withOpacity() calls to withValues(alpha:) and
surfaceVariant to surfaceContainerHighest across the codebase.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Doug BorgandClaude Opus 4.5 committed 2026-02-08 14:23:07 -07:00
1 parent c712aba724
commit 3dada20ec2
24 files changed
+63 -65

No files matched your search

+4 -4
View File
@@ -62,8 +62,8 @@ class MapOverlays extends StatelessWidget {
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 4),
decoration: BoxDecoration(
color: uploadMode == UploadMode.sandbox
? Colors.orange.withOpacity(0.90)
: Colors.deepPurple.withOpacity(0.80),
? Colors.orange.withValues(alpha: 0.90)
: Colors.deepPurple.withValues(alpha: 0.80),
borderRadius: BorderRadius.circular(8),
boxShadow: const [
BoxShadow(color: Colors.black26, blurRadius: 5, offset: Offset(0,2)),
@@ -96,7 +96,7 @@ class MapOverlays extends StatelessWidget {
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 7, vertical: 2),
decoration: BoxDecoration(
color: Colors.black.withOpacity(0.52),
color: Colors.black.withValues(alpha: 0.52),
borderRadius: BorderRadius.circular(7),
),
child: Builder(
@@ -129,7 +129,7 @@ class MapOverlays extends StatelessWidget {
onTap: () => _showAttributionDialog(context, attribution!),
child: Container(
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surface.withOpacity(0.9),
color: Theme.of(context).colorScheme.surface.withValues(alpha: 0.9),
borderRadius: BorderRadius.circular(4),
),
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 4),