of static method

DialogHandler of(
  1. BuildContext context
)

Implementation

static DialogHandler of(BuildContext context) {
  final DialogHandler? handler = context
      .dependOnInheritedWidgetOfExactType<InheritedDialogManager>()
      ?.dialogHandler;

  assert(
    handler != null,
    'DialogManager operation requested with a context that does not include a DialogManager.'
    'The context used to show dialogs from the DialogManager must be that of a '
    'widget that is a descendant of a DialogManager widget.',
  );

  return handler!;
}