of static method
Returns the GalleryController most closely associated with the given context.
Returns null if there is no GalleryController associated with the given context.
Implementation
static GalleryController? of(BuildContext context) {
final result =
context.dependOnInheritedWidgetOfExactType<GalleryControllerProvider>();
return result?.controller;
}