of static method Null safety

PersistentContext of(
  1. BuildContext context
)

The PersistentContext instance for the given BuildContext

Implementation

static PersistentContext of(BuildContext context) {
  return context.dependOnInheritedWidgetOfExactType<PersistentContext>()!;
}