Skip to content

Conversation

@akhil-ge0rge
Copy link

This PR updates the codebase to remove usage of deprecated Flutter APIs.

Changes include:

  • Migrating deprecated properties to their recommended replacements
  • Ensuring compatibility with the latest Flutter stable release
  • Improving code maintainability and future-proofing

All changes are backward-compatible and do not alter UI or functionality.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes the Flutter codebase by replacing deprecated APIs with their current recommended equivalents, ensuring compatibility with newer Flutter versions while maintaining all existing functionality.

Key changes:

  • Replaced withOpacity() with withValues(alpha:) for color opacity modifications
  • Updated color component accessors from .red/.green/.blue/.opacity to .r/.g/.b/.a
  • Migrated textScaleFactor and textScaleFactorOf to the newer TextScaler API
  • Changed mounted property checks to context.mounted for better context safety
  • Refactored forEach to standard for loops where appropriate

Reviewed changes

Copilot reviewed 37 out of 37 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
petra_illustration.dart Updated opacity method calls on foreground colors
illustration_piece.dart Code formatting adjustments
_wonder_image_with_timeline.dart Migrated color component accessors to new API
_events_list.dart Updated backdrop color opacity usage
_event_markers.dart Replaced opacity method calls for marker colors
_animated_cutout_overlay.dart Updated overlay color opacity
intro_screen.dart Migrated gradient color opacity
home_menu.dart Updated mounted check and multiple color opacity calls
about_dialog_content.dart Migrated text scale factor to TextScaler API
wonders_home_screen.dart Updated multiple gradient and color opacity calls
_scrolling_content.dart Migrated text scale factor and updated color opacity
_collapsing_pull_quote_image.dart Updated gradient color opacity values
_app_bar.dart Updated overlay color opacity
_collection_footer.dart Updated footer gradient and progress bar colors
_collectible_image.dart Updated shadow color opacity
_celebration_particles.dart Updated particle color opacity
collectible_found_screen.dart Updated multiple screen color opacity calls
_search_input.dart Updated input decoration color opacity values
_results_grid.dart Updated result tile background opacity
_result_tile.dart Updated tile color opacity
time_range_painter.dart Updated paint fill color opacity
range_selector.dart Updated selector decoration color opacity values
expanding_time_range_selector.dart Updated container and timeline colors
artifact_search_screen.dart Updated icon color opacity
_artifact_image_btn.dart Updated gradient color opacity
_blurred_image_bg.dart Updated background foreground decoration opacity
artifact_carousel_screen.dart Updated carousel container color opacity
static_text_scale.dart Migrated textScaleFactor to TextScaler API
list_gradient.dart Updated gradient color opacity values
fade_color_transition.dart Updated transition color opacity
scroll_decorator.dart Updated scroll gradient color opacity
checkbox.dart Updated checkbox color opacity values
app_image.dart Updated placeholder icon color opacity
app_backdrop.dart Updated backdrop fill color opacity
styles.dart Updated shadow color opacity values
color_utils.dart Migrated color component accessors to new API
app_logic.dart Refactored forEach to for loops

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant