of static method

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

If there is no enclosing ChannelListViewTheme widget, then StreamChatThemeData.channelListViewTheme is used.

Typical usage is as follows:

ChannelListViewTheme theme = ChannelListViewTheme.of(context);

Implementation

static ChannelListViewThemeData of(BuildContext context) {
  final channelListViewTheme =
      context.dependOnInheritedWidgetOfExactType<ChannelListViewTheme>();
  return channelListViewTheme?.data ??
      StreamChatTheme.of(context).channelListViewTheme;
}