of static method

Returns the nearest controller.

Implementation

static ReloadController of(BuildContext context) {
  final controller = maybeOf(context);
  assert(controller != null, 'No ReloadScope found in the widget tree');
  return controller!;
}