Skip to content

Dialog.fullscreen should set a parentRoute.fullscreenDialog #165478

@feinstein

Description

@feinstein

Use case

I am showing a dialog using the Dialog.fullscreen constructor, but when I do it and I have an AppBar inside the dialog, then the AppBar will show a BackButton and not a CloseButton.

This happens because the AppBar automatically selects it's button based on parentRoute.fullscreenDialog, which showDialog nor showGeneralDialog set to true, since they don't create a PageRoute but a RawDialogRoute that doesn't have this flag available.

Proposal

showDialog and it's variants like showGeneralDialog should have an optional parameter fullscreenDialog that can be forwarded (and added) to RawDialogRoute and DialogRoute, so the AppBar could automatically detect if it's current route is a full-screen one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: 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.team-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions