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