Skip to content

Conversation

@InesaFitsner
Copy link
Contributor

@InesaFitsner InesaFitsner commented Oct 22, 2025

Replaced manual icon construction with buildIconOrWidget for 'icon' and 'selected_icon' properties in NavigationRailControl to fix bug when selected_icon is None

Description

Test Code

# Test code for the review of this PR

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist

  • I signed the CLA.
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing tests pass locally with my changes
  • I have made corresponding changes to the documentation (if applicable)

Screenshots

Additional details

Summary by Sourcery

Refactor NavigationRailControl to use buildIconOrWidget for both icon and selected_icon, ensuring selected_icon can be null without errors.

Bug Fixes:

  • Fix crash when selected_icon is None in NavigationRailControl

Enhancements:

  • Replace manual icon widget construction with buildIconOrWidget for icon and selected_icon

Chores:

  • Remove unused icons.dart import

Replaced manual icon construction with buildIconOrWidget for 'icon' and 'selected_icon' properties in NavigationRailControl to fix bug when selected_icon is None
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

We've reviewed this pull request using the Sourcery rules engine

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Oct 22, 2025

Deploying flet-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1effd35
Status: ✅  Deploy successful!
Preview URL: https://8592411f.flet-docs.pages.dev
Branch Preview URL: https://inesa-fix-navigation-rail-bu.flet-docs.pages.dev

View logs

Introduces a new integration test and golden image for NavigationRail when no selected icon is provided for a destination to test issue when no selected_icon provided. Updates test setup to use pytest_asyncio fixture for improved test isolation.
@FeodorFitsner FeodorFitsner merged commit 9280491 into main Oct 23, 2025
25 of 46 checks passed
@FeodorFitsner FeodorFitsner deleted the inesa/fix-navigation-rail-bug1 branch October 23, 2025 16:55
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.

3 participants