of static method

PageModel of(
  1. BuildContext context
)

Implementation

static PageModel of(BuildContext context) {
  final widget = context
      .getElementForInheritedWidgetOfExactType<_SharedModelWidget>()
      ?.widget as _SharedModelWidget?;
  return widget?.model ?? PageModel.fake();
}