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