of static method
The closest instance of this class that encloses the given context.
If there is no enclosing GalleryHeaderTheme widget, then StreamChatThemeData.galleryHeaderTheme is used.
Typical usage is as follows:
ImageHeaderTheme theme = ImageHeaderTheme.of(context);
Implementation
static GalleryHeaderThemeData of(BuildContext context) {
final galleryHeaderTheme =
context.dependOnInheritedWidgetOfExactType<GalleryHeaderTheme>();
return galleryHeaderTheme?.data ??
StreamChatTheme.of(context).galleryHeaderTheme;
}