of static method

The closest instance of this class that encloses the given context.

If there is no enclosing GalleryHeaderTheme widget, then StreamFeedThemeData.galleryHeaderTheme is used.

Typical usage is as follows:

final theme = GalleryHeaderTheme.of(context);

Implementation

static GalleryHeaderThemeData of(BuildContext context) {
  final galleryHeaderTheme =
      context.dependOnInheritedWidgetOfExactType<GalleryHeaderTheme>();
  return galleryHeaderTheme?.data ??
      PensilTheme.of(context).galleryHeaderTheme;
}