of static method
Implementation
static GalleryController of(BuildContext context) {
final result = context.dependOnInheritedWidgetOfExactType<GalleryControllerProvider>();
assert(
result != null,
'Error: Could not find the GalleryController above this '
'This happens because you used a `BuildContext` that does not include the provider',
);
return result!.controller;
}