of static method

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

If there is no enclosing UserListViewTheme widget, then StreamChatThemeData.userListViewTheme is used.

Typical usage is as follows:

UserListViewTheme theme = UserListViewTheme.of(context);

Implementation

static UserListViewThemeData of(BuildContext context) {
  final userListViewTheme =
      context.dependOnInheritedWidgetOfExactType<UserListViewTheme>();
  return userListViewTheme?.data ??
      StreamChatTheme.of(context).userListViewTheme;
}