Skip to content

Deprecate CupertinoDialog class #20397

@matthew-carroll

Description

@matthew-carroll

CupertinoDialog and CupertinoAlertDialog have both existed for some time. For that time both dialogs have been rendered in a manner that does not match iOS accurately. Both dialogs essentially treated an iOS dialog as a generic modal comprised of a blurred rounded rect + some content. But this isn't what a dialog really is in iOS.

iOS only offers an alert dialog. There is no generic dialog. The alert dialog separates content from buttons with gap dividers that show through to the blurred area behind it. This is a very specific layout policy and therefore it does not generalize to some universal concept of a dialog.

Thus, CupertinoDialog is neither an existing iOS UI element, nor is it a faithful generalization of iOS layout and rendering policy. As a result, we should eliminate CupertinoDialog. Developers should either use CupertinoAlertDialog as a direct replacement for an alert dialog in iOS, or developers should create whatever their custom modal is (because no other modal is a legitimate iOS replica).

PS - If there are building blocks that we should provide to make it easier for developers to make iOS-ish dialogs, that may be completely legitimate and I'm happy to consider creating those building blocks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: API breakBackwards-incompatible API changesc: proposalA detailed proposal for a change to Flutterf: cupertinoflutter/packages/flutter/cupertino repositoryframeworkflutter/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