of static method
- BuildContext context
Retrieves the DialogThemeData from the closest ancestor DialogTheme.
If there is no enclosing DialogTheme widget, then ThemeData.dialogTheme is used.
Typical usage is as follows:
DialogThemeData theme = DialogTheme.of(context);
Implementation
static DialogThemeData of(BuildContext context) {
final DialogTheme? dialogTheme = context.dependOnInheritedWidgetOfExactType<DialogTheme>();
return dialogTheme?.data ?? Theme.of(context).dialogTheme;
}