of static method

Ambil DbLensController dari scope terdekat di atas context.

Implementation

static DbLensController of(BuildContext context) {
  final scope =
      context.dependOnInheritedWidgetOfExactType<_DbLensControllerInherited>();
  assert(
    scope != null,
    'DbLensControllerScope.of() dipanggil tanpa ada DbLensControllerScope '
    'di atasnya. Bungkus widget tree dengan DbLensControllerScope(...) '
    'dulu.',
  );
  return scope!.controller;
}