Skip to content

Proposal to add option to Disable [NavigationRailDestination]s #127108

@matheus-kirchesch

Description

@matheus-kirchesch

Is there an existing issue for this?

Use case

Any kind of routing that is permission based.

Proposal

  • Add optional member in the [NavigationRailDestination] on file [NavigationRailDestinations] class do mark it disabled.
  • On the file [navigation_rail.dart] at the class [_RailDestination] add a nullable mark to the VoidCallback onTap member.
  • On the file [navigation_rail.dart] at the class [_NavigationRailState] you add [widget.destinations[i].disabled? null :] before the callback that is there right now.

The reason I don't do that myself on a PR is that I don't know the rules. And also I am not sure the best practices when disabling a widget, Flutter conventions etc..., so I guess applying an opacity to help indicate it is disabled.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterf: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions