diff --git a/lib/screens/home_screen.dart b/lib/screens/home_screen.dart index 3242edc..cc0514d 100644 --- a/lib/screens/home_screen.dart +++ b/lib/screens/home_screen.dart @@ -544,7 +544,7 @@ class _HomeScreenState extends State with TickerProviderStateMixin { borderRadius: BorderRadius.circular(16), boxShadow: [ BoxShadow( - color: Theme.of(context).shadowColor.withOpacity(0.3), + color: Theme.of(context).shadowColor.withValues(alpha: 0.3), blurRadius: 10, offset: Offset(0, -2), ) diff --git a/lib/screens/navigation_settings_screen.dart b/lib/screens/navigation_settings_screen.dart index 659fe76..9a4829b 100644 --- a/lib/screens/navigation_settings_screen.dart +++ b/lib/screens/navigation_settings_screen.dart @@ -132,7 +132,7 @@ class _NavigationSettingsScreenState extends State { Text( value, style: Theme.of(context).textTheme.bodySmall?.copyWith( - color: Theme.of(context).textTheme.bodySmall?.color?.withOpacity(0.6), + color: Theme.of(context).textTheme.bodySmall?.color?.withValues(alpha: 0.6), ), ), const SizedBox(width: 8), diff --git a/lib/screens/osm_account_screen.dart b/lib/screens/osm_account_screen.dart index 11135ca..1e25488 100644 --- a/lib/screens/osm_account_screen.dart +++ b/lib/screens/osm_account_screen.dart @@ -275,7 +275,7 @@ class _OSMAccountScreenState extends State { Container( padding: const EdgeInsets.all(12.0), decoration: BoxDecoration( - color: Theme.of(context).colorScheme.surfaceVariant.withOpacity(0.5), + color: Theme.of(context).colorScheme.surfaceContainerHighest.withValues(alpha: 0.5), borderRadius: BorderRadius.circular(8.0), ), child: Row( @@ -308,7 +308,7 @@ class _OSMAccountScreenState extends State { label: Text(locService.t('auth.deleteAccount')), style: OutlinedButton.styleFrom( foregroundColor: Theme.of(context).colorScheme.error, - side: BorderSide(color: Theme.of(context).colorScheme.error.withOpacity(0.5)), + side: BorderSide(color: Theme.of(context).colorScheme.error.withValues(alpha: 0.5)), ), ), ), @@ -354,10 +354,10 @@ class _OSMAccountScreenState extends State { Container( padding: const EdgeInsets.all(12.0), decoration: BoxDecoration( - color: Theme.of(context).colorScheme.errorContainer.withOpacity(0.1), + color: Theme.of(context).colorScheme.errorContainer.withValues(alpha: 0.1), borderRadius: BorderRadius.circular(8.0), border: Border.all( - color: Theme.of(context).colorScheme.error.withOpacity(0.3), + color: Theme.of(context).colorScheme.error.withValues(alpha: 0.3), ), ), child: Text( diff --git a/lib/screens/release_notes_screen.dart b/lib/screens/release_notes_screen.dart index 28bfcc6..f713d22 100644 --- a/lib/screens/release_notes_screen.dart +++ b/lib/screens/release_notes_screen.dart @@ -99,7 +99,7 @@ class _ReleaseNotesScreenState extends State { color: Theme.of(context).colorScheme.primaryContainer, borderRadius: BorderRadius.circular(8), border: Border.all( - color: Theme.of(context).colorScheme.primary.withOpacity(0.3), + color: Theme.of(context).colorScheme.primary.withValues(alpha: 0.3), ), ), child: Row( @@ -142,8 +142,8 @@ class _ReleaseNotesScreenState extends State { decoration: BoxDecoration( border: Border.all( color: isCurrentVersion - ? Theme.of(context).colorScheme.primary.withOpacity(0.3) - : Theme.of(context).dividerColor.withOpacity(0.3), + ? Theme.of(context).colorScheme.primary.withValues(alpha: 0.3) + : Theme.of(context).dividerColor.withValues(alpha: 0.3), ), borderRadius: BorderRadius.circular(8), ), diff --git a/lib/screens/settings/sections/proximity_alerts_section.dart b/lib/screens/settings/sections/proximity_alerts_section.dart index 44acf5e..77bdea5 100644 --- a/lib/screens/settings/sections/proximity_alerts_section.dart +++ b/lib/screens/settings/sections/proximity_alerts_section.dart @@ -140,9 +140,9 @@ class _ProximityAlertsSectionState extends State { Container( padding: const EdgeInsets.all(12), decoration: BoxDecoration( - color: Colors.orange.withOpacity(0.1), + color: Colors.orange.withValues(alpha: 0.1), borderRadius: BorderRadius.circular(8), - border: Border.all(color: Colors.orange.withOpacity(0.3)), + border: Border.all(color: Colors.orange.withValues(alpha: 0.3)), ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -233,7 +233,7 @@ class _ProximityAlertsSectionState extends State { DistanceService.convertFromMeters(kProximityAlertDefaultDistance.toDouble(), appState.distanceUnit).round().toString(), ]), style: Theme.of(context).textTheme.bodySmall?.copyWith( - color: Theme.of(context).textTheme.bodySmall?.color?.withOpacity(0.6), + color: Theme.of(context).textTheme.bodySmall?.color?.withValues(alpha: 0.6), ), ), ], diff --git a/lib/screens/settings/sections/tile_provider_section.dart b/lib/screens/settings/sections/tile_provider_section.dart index 93cee9d..6ed55bd 100644 --- a/lib/screens/settings/sections/tile_provider_section.dart +++ b/lib/screens/settings/sections/tile_provider_section.dart @@ -44,7 +44,7 @@ class TileProviderSection extends StatelessWidget { ), ) else - ...providers.map((provider) => _buildProviderTile(context, provider, appState)).toList(), + ...providers.map((provider) => _buildProviderTile(context, provider, appState)), ], ); }, @@ -89,7 +89,7 @@ class TileProviderSection extends StatelessWidget { leading: CircleAvatar( backgroundColor: isSelected ? Theme.of(context).colorScheme.primary - : Theme.of(context).colorScheme.surfaceVariant, + : Theme.of(context).colorScheme.surfaceContainerHighest, child: Icon( Icons.map, color: isSelected diff --git a/lib/screens/settings/sections/upload_mode_section.dart b/lib/screens/settings/sections/upload_mode_section.dart index 65d280e..61da379 100644 --- a/lib/screens/settings/sections/upload_mode_section.dart +++ b/lib/screens/settings/sections/upload_mode_section.dart @@ -81,7 +81,7 @@ class UploadModeSection extends StatelessWidget { fontSize: 12, color: appState.pendingCount > 0 ? Theme.of(context).disabledColor - : Theme.of(context).colorScheme.onSurface.withOpacity(0.7) + : Theme.of(context).colorScheme.onSurface.withValues(alpha: 0.7) ) ); case UploadMode.sandbox: diff --git a/lib/screens/settings_screen.dart b/lib/screens/settings_screen.dart index ea88105..620acaf 100644 --- a/lib/screens/settings_screen.dart +++ b/lib/screens/settings_screen.dart @@ -102,7 +102,7 @@ class SettingsScreen extends StatelessWidget { child: Text( 'Version: ${VersionService().version}', style: Theme.of(context).textTheme.bodySmall?.copyWith( - color: Theme.of(context).textTheme.bodySmall?.color?.withOpacity(0.6), + color: Theme.of(context).textTheme.bodySmall?.color?.withValues(alpha: 0.6), ), textAlign: TextAlign.center, ), diff --git a/lib/widgets/camera_icon.dart b/lib/widgets/camera_icon.dart index 4fa015a..0637936 100644 --- a/lib/widgets/camera_icon.dart +++ b/lib/widgets/camera_icon.dart @@ -40,7 +40,7 @@ class CameraIcon extends StatelessWidget { height: kNodeIconDiameter, decoration: BoxDecoration( shape: BoxShape.circle, - color: _ringColor.withOpacity(kNodeDotOpacity), + color: _ringColor.withValues(alpha: kNodeDotOpacity), border: Border.all( color: _ringColor, width: getNodeRingThickness(context), diff --git a/lib/widgets/compass_indicator.dart b/lib/widgets/compass_indicator.dart index 4770379..c1630be 100644 --- a/lib/widgets/compass_indicator.dart +++ b/lib/widgets/compass_indicator.dart @@ -96,8 +96,8 @@ class _CompassIndicatorState extends State { height: 52, decoration: BoxDecoration( color: isDisabled - ? Colors.grey.withOpacity(0.8) - : Colors.white.withOpacity(0.95), + ? Colors.grey.withValues(alpha: 0.8) + : Colors.white.withValues(alpha: 0.95), shape: BoxShape.circle, border: Border.all( color: isDisabled @@ -107,7 +107,7 @@ class _CompassIndicatorState extends State { ), boxShadow: [ BoxShadow( - color: Colors.black.withOpacity(0.25), + color: Colors.black.withValues(alpha: 0.25), blurRadius: 6, offset: const Offset(0, 3), ), diff --git a/lib/widgets/download_area_dialog.dart b/lib/widgets/download_area_dialog.dart index 0a4ef32..8ea1682 100644 --- a/lib/widgets/download_area_dialog.dart +++ b/lib/widgets/download_area_dialog.dart @@ -189,8 +189,8 @@ class _DownloadAreaDialogState extends State { padding: const EdgeInsets.all(8), decoration: BoxDecoration( color: _tileCount! > kMaxReasonableTileCount - ? Colors.orange.withOpacity(0.1) - : Colors.green.withOpacity(0.1), + ? Colors.orange.withValues(alpha: 0.1) + : Colors.green.withValues(alpha: 0.1), borderRadius: BorderRadius.circular(4), ), child: Column( @@ -198,7 +198,7 @@ class _DownloadAreaDialogState extends State { children: [ Text( _tileCount! > kMaxReasonableTileCount - ? 'Above recommended limit (Z${_maxPossibleZoom})' + ? 'Above recommended limit (Z$_maxPossibleZoom)' : locService.t('download.maxRecommendedZoom', params: [_maxPossibleZoom.toString()]), style: TextStyle( fontSize: 12, @@ -211,7 +211,7 @@ class _DownloadAreaDialogState extends State { const SizedBox(height: 2), Text( _tileCount! > kMaxReasonableTileCount - ? 'Current selection exceeds ${kMaxReasonableTileCount} recommended tile limit but is within ${kAbsoluteMaxTileCount} absolute limit' + ? 'Current selection exceeds $kMaxReasonableTileCount recommended tile limit but is within $kAbsoluteMaxTileCount absolute limit' : locService.t('download.withinTileLimit', params: [kMaxReasonableTileCount.toString()]), style: TextStyle( fontSize: 11, @@ -230,9 +230,9 @@ class _DownloadAreaDialogState extends State { child: Container( padding: const EdgeInsets.all(12), decoration: BoxDecoration( - color: Colors.orange.withOpacity(0.1), + color: Colors.orange.withValues(alpha: 0.1), borderRadius: BorderRadius.circular(8), - border: Border.all(color: Colors.orange.withOpacity(0.3)), + border: Border.all(color: Colors.orange.withValues(alpha: 0.3)), ), child: Row( children: [ diff --git a/lib/widgets/map/direction_cones.dart b/lib/widgets/map/direction_cones.dart index fce8265..5c38aed 100644 --- a/lib/widgets/map/direction_cones.dart +++ b/lib/widgets/map/direction_cones.dart @@ -203,7 +203,7 @@ class DirectionConesBuilder { return Polygon( points: points, - color: kDirectionConeColor.withOpacity(opacity), + color: kDirectionConeColor.withValues(alpha: opacity), borderColor: kDirectionConeColor, borderStrokeWidth: getDirectionConeBorderWidth(context), ); @@ -251,7 +251,7 @@ class DirectionConesBuilder { return Polygon( points: points, - color: kDirectionConeColor.withOpacity(opacity), + color: kDirectionConeColor.withValues(alpha: opacity), borderColor: kDirectionConeColor, borderStrokeWidth: getDirectionConeBorderWidth(context), ); diff --git a/lib/widgets/map/layer_selector_button.dart b/lib/widgets/map/layer_selector_button.dart index f820289..1490105 100644 --- a/lib/widgets/map/layer_selector_button.dart +++ b/lib/widgets/map/layer_selector_button.dart @@ -81,7 +81,7 @@ class _LayerSelectorDialogState extends State<_LayerSelectorDialog> { Container( padding: const EdgeInsets.all(16), decoration: BoxDecoration( - color: Theme.of(context).colorScheme.surfaceVariant, + color: Theme.of(context).colorScheme.surfaceContainerHighest, borderRadius: const BorderRadius.vertical(top: Radius.circular(12)), ), child: Row( diff --git a/lib/widgets/map/map_overlays.dart b/lib/widgets/map/map_overlays.dart index b284319..0d9772f 100644 --- a/lib/widgets/map/map_overlays.dart +++ b/lib/widgets/map/map_overlays.dart @@ -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), diff --git a/lib/widgets/map/overlay_layer_builder.dart b/lib/widgets/map/overlay_layer_builder.dart index 2658357..4461f1f 100644 --- a/lib/widgets/map/overlay_layer_builder.dart +++ b/lib/widgets/map/overlay_layer_builder.dart @@ -4,7 +4,6 @@ import 'package:latlong2/latlong.dart'; import '../../models/osm_node.dart'; import '../../app_state.dart'; -import '../../state/session_state.dart'; import '../../dev_config.dart'; import 'direction_cones.dart'; @@ -38,7 +37,7 @@ class OverlayLayerBuilder { overlays.add( Polygon( points: selectedLocation.bounds, - color: Colors.orange.withOpacity(0.3), + color: Colors.orange.withValues(alpha: 0.3), borderColor: Colors.orange, borderStrokeWidth: 2.0, ), diff --git a/lib/widgets/navigation_sheet.dart b/lib/widgets/navigation_sheet.dart index 312a952..4c6d390 100644 --- a/lib/widgets/navigation_sheet.dart +++ b/lib/widgets/navigation_sheet.dart @@ -1,4 +1,3 @@ -import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:latlong2/latlong.dart'; @@ -182,9 +181,9 @@ class NavigationSheet extends StatelessWidget { Container( padding: const EdgeInsets.all(12), decoration: BoxDecoration( - color: Colors.amber.withOpacity(0.1), + color: Colors.amber.withValues(alpha: 0.1), borderRadius: BorderRadius.circular(8), - border: Border.all(color: Colors.amber.withOpacity(0.3)), + border: Border.all(color: Colors.amber.withValues(alpha: 0.3)), ), child: Row( crossAxisAlignment: CrossAxisAlignment.start, @@ -212,9 +211,9 @@ class NavigationSheet extends StatelessWidget { Container( padding: const EdgeInsets.all(12), decoration: BoxDecoration( - color: Colors.orange.withOpacity(0.1), + color: Colors.orange.withValues(alpha: 0.1), borderRadius: BorderRadius.circular(8), - border: Border.all(color: Colors.orange.withOpacity(0.3)), + border: Border.all(color: Colors.orange.withValues(alpha: 0.3)), ), child: Row( children: [ diff --git a/lib/widgets/node_tag_sheet.dart b/lib/widgets/node_tag_sheet.dart index 80b0994..5c54b35 100644 --- a/lib/widgets/node_tag_sheet.dart +++ b/lib/widgets/node_tag_sheet.dart @@ -40,7 +40,7 @@ class NodeTagSheet extends StatelessWidget { final isRealOSMNode = !node.tags.containsKey('_pending_upload') && node.id > 0; // Real OSM nodes have positive IDs - void _openEditSheet() { + void openEditSheet() { // Check if node limit is active and warn user if (isNodeLimitActive) { ScaffoldMessenger.of(context).showSnackBar( @@ -64,7 +64,7 @@ class NodeTagSheet extends StatelessWidget { } } - void _deleteNode() async { + void deleteNode() async { final shouldDelete = await showDialog( context: context, builder: (BuildContext context) { @@ -95,7 +95,7 @@ class NodeTagSheet extends StatelessWidget { } } - void _viewOnOSM() async { + void viewOnOSM() async { final url = 'https://www.openstreetmap.org/node/${node.id}'; try { final uri = Uri.parse(url); @@ -117,7 +117,7 @@ class NodeTagSheet extends StatelessWidget { } } - void _openAdvancedEdit() { + void openAdvancedEdit() { showModalBottomSheet( context: context, isScrollControlled: true, @@ -177,7 +177,7 @@ class NodeTagSheet extends StatelessWidget { }, text: e.value, style: TextStyle( - color: Theme.of(context).colorScheme.onSurface.withOpacity(0.7), + color: Theme.of(context).colorScheme.onSurface.withValues(alpha: 0.7), ), linkStyle: TextStyle( color: Theme.of(context).colorScheme.primary, @@ -201,7 +201,7 @@ class NodeTagSheet extends StatelessWidget { children: [ if (isRealOSMNode) ...[ TextButton.icon( - onPressed: () => _viewOnOSM(), + onPressed: () => viewOnOSM(), icon: const Icon(Icons.open_in_new, size: 16), label: Text(locService.t('actions.viewOnOSM')), ), @@ -209,7 +209,7 @@ class NodeTagSheet extends StatelessWidget { ], if (isEditable) ...[ OutlinedButton.icon( - onPressed: _openAdvancedEdit, + onPressed: openAdvancedEdit, icon: const Icon(Icons.open_in_new, size: 18), label: Text(locService.t('actions.advanced')), style: OutlinedButton.styleFrom( @@ -226,7 +226,7 @@ class NodeTagSheet extends StatelessWidget { children: [ if (isEditable) ...[ ElevatedButton.icon( - onPressed: _openEditSheet, + onPressed: openEditSheet, icon: const Icon(Icons.edit, size: 18), label: Text(locService.edit), style: ElevatedButton.styleFrom( @@ -235,7 +235,7 @@ class NodeTagSheet extends StatelessWidget { ), const SizedBox(width: 8), ElevatedButton.icon( - onPressed: node.isConstrained ? null : _deleteNode, + onPressed: node.isConstrained ? null : deleteNode, icon: const Icon(Icons.delete, size: 18), label: Text(locService.t('actions.delete')), style: ElevatedButton.styleFrom( diff --git a/lib/widgets/positioning_tutorial_overlay.dart b/lib/widgets/positioning_tutorial_overlay.dart index 20475cb..4b7be77 100644 --- a/lib/widgets/positioning_tutorial_overlay.dart +++ b/lib/widgets/positioning_tutorial_overlay.dart @@ -30,7 +30,7 @@ class PositioningTutorialOverlay extends StatelessWidget { ), child: Container( decoration: BoxDecoration( - color: Colors.black.withOpacity(0.3), // Semi-transparent overlay + color: Colors.black.withValues(alpha: 0.3), // Semi-transparent overlay ), child: Center( child: Padding( @@ -73,7 +73,7 @@ class PositioningTutorialOverlay extends StatelessWidget { Text( locService.t('positioningTutorial.hint'), style: TextStyle( - color: Colors.white.withOpacity(0.8), + color: Colors.white.withValues(alpha: 0.8), fontSize: 14, fontStyle: FontStyle.italic, ), diff --git a/lib/widgets/provisional_pin.dart b/lib/widgets/provisional_pin.dart index 2757dc1..1e49d91 100644 --- a/lib/widgets/provisional_pin.dart +++ b/lib/widgets/provisional_pin.dart @@ -43,7 +43,7 @@ class LocationPin extends StatelessWidget { width: size * 0.4, height: size * 0.2, decoration: BoxDecoration( - color: Colors.black.withOpacity(0.3), + color: Colors.black.withValues(alpha: 0.3), borderRadius: BorderRadius.circular(size * 0.1), ), ), @@ -64,7 +64,7 @@ class LocationPin extends StatelessWidget { color: Colors.white, shape: BoxShape.circle, border: Border.all( - color: _pinColor.withOpacity(0.8), + color: _pinColor.withValues(alpha: 0.8), width: 1.5, ), ), diff --git a/lib/widgets/proximity_alert_banner.dart b/lib/widgets/proximity_alert_banner.dart index 154f3c7..d461fb7 100644 --- a/lib/widgets/proximity_alert_banner.dart +++ b/lib/widgets/proximity_alert_banner.dart @@ -82,7 +82,7 @@ class _ProximityAlertBannerState extends State color: Colors.red.shade600, boxShadow: [ BoxShadow( - color: Colors.black.withOpacity(0.3), + color: Colors.black.withValues(alpha: 0.3), blurRadius: 10, offset: const Offset(0, 2), ), diff --git a/lib/widgets/reauth_messages_dialog.dart b/lib/widgets/reauth_messages_dialog.dart index 891f7c4..5b57a77 100644 --- a/lib/widgets/reauth_messages_dialog.dart +++ b/lib/widgets/reauth_messages_dialog.dart @@ -38,7 +38,7 @@ class ReauthMessagesDialog extends StatelessWidget { Container( padding: const EdgeInsets.all(12.0), decoration: BoxDecoration( - color: Theme.of(context).colorScheme.primaryContainer.withOpacity(0.3), + color: Theme.of(context).colorScheme.primaryContainer.withValues(alpha: 0.3), borderRadius: BorderRadius.circular(8.0), ), child: Row( diff --git a/lib/widgets/submission_guide_dialog.dart b/lib/widgets/submission_guide_dialog.dart index 37262ba..6473edb 100644 --- a/lib/widgets/submission_guide_dialog.dart +++ b/lib/widgets/submission_guide_dialog.dart @@ -81,9 +81,9 @@ class _SubmissionGuideDialogState extends State { Container( padding: const EdgeInsets.all(12), decoration: BoxDecoration( - color: Colors.blue.withOpacity(0.1), + color: Colors.blue.withValues(alpha: 0.1), borderRadius: BorderRadius.circular(8), - border: Border.all(color: Colors.blue.withOpacity(0.3)), + border: Border.all(color: Colors.blue.withValues(alpha: 0.3)), ), child: Text( locService.t('submissionGuide.bestPractices'), @@ -171,10 +171,10 @@ class _SubmissionGuideDialogState extends State { child: Container( padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4), decoration: BoxDecoration( - color: Theme.of(context).colorScheme.primary.withOpacity(0.1), + color: Theme.of(context).colorScheme.primary.withValues(alpha: 0.1), borderRadius: BorderRadius.circular(4), border: Border.all( - color: Theme.of(context).colorScheme.primary.withOpacity(0.3), + color: Theme.of(context).colorScheme.primary.withValues(alpha: 0.3), ), ), child: Text( diff --git a/lib/widgets/suspected_location_sheet.dart b/lib/widgets/suspected_location_sheet.dart index 470e7b9..60f90d3 100644 --- a/lib/widgets/suspected_location_sheet.dart +++ b/lib/widgets/suspected_location_sheet.dart @@ -94,7 +94,7 @@ class SuspectedLocationSheet extends StatelessWidget { : Text( e.value, style: TextStyle( - color: Theme.of(context).colorScheme.onSurface.withOpacity(0.7), + color: Theme.of(context).colorScheme.onSurface.withValues(alpha: 0.7), ), softWrap: true, ), @@ -128,7 +128,7 @@ class SuspectedLocationSheet extends StatelessWidget { child: Text( '${location.centroid.latitude.toStringAsFixed(6)}, ${location.centroid.longitude.toStringAsFixed(6)}', style: TextStyle( - color: Theme.of(context).colorScheme.onSurface.withOpacity(0.7), + color: Theme.of(context).colorScheme.onSurface.withValues(alpha: 0.7), ), softWrap: true, ), diff --git a/lib/widgets/welcome_dialog.dart b/lib/widgets/welcome_dialog.dart index 0e9911c..627c3d9 100644 --- a/lib/widgets/welcome_dialog.dart +++ b/lib/widgets/welcome_dialog.dart @@ -88,9 +88,9 @@ class _WelcomeDialogState extends State { Container( padding: const EdgeInsets.all(12), decoration: BoxDecoration( - color: Colors.orange.withOpacity(0.1), + color: Colors.orange.withValues(alpha: 0.1), borderRadius: BorderRadius.circular(8), - border: Border.all(color: Colors.orange.withOpacity(0.3)), + border: Border.all(color: Colors.orange.withValues(alpha: 0.3)), ), child: Text( locService.t('welcome.firsthandKnowledge'), @@ -171,10 +171,10 @@ class _WelcomeDialogState extends State { child: Container( padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4), decoration: BoxDecoration( - color: Theme.of(context).colorScheme.primary.withOpacity(0.1), + color: Theme.of(context).colorScheme.primary.withValues(alpha: 0.1), borderRadius: BorderRadius.circular(4), border: Border.all( - color: Theme.of(context).colorScheme.primary.withOpacity(0.3), + color: Theme.of(context).colorScheme.primary.withValues(alpha: 0.3), ), ), child: Text(