read static method

IndexModel? read(
  1. BuildContext context
)

without update

Implementation

static IndexModel? read(BuildContext context) {
  final widget = context
      .getElementForInheritedWidgetOfExactType<IndexNotifierProvider>()
      ?.widget;
  return widget is IndexNotifierProvider ? widget.notifier : null;
}