Skip to content

Customize the showDialog barrierColor via DialogTheme #142489

@davidmartos96

Description

@davidmartos96

Use case

Customize the barrierColor used in showDialog globally. This can help to provide better barrier contrast in themes that are almost black, where the default value of black54 as barrier doesn't help much in distinguishing the modal barrier.

Proposal

Same as in BottomSheetThemeData, we could have a barrierColor property to customize the showDialog globally.

Reference implementation from showModalBottomSheet:

modalBarrierColor: barrierColor ?? Theme.of(context).bottomSheetTheme.modalBarrierColor,

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listc: 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 versionteam-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