of static method

Use this method to get the current ChannelsBlocState instance

Implementation

static ChannelsBlocState of(BuildContext context) {
  ChannelsBlocState? streamChatState;

  streamChatState = context.findAncestorStateOfType<ChannelsBlocState>();

  assert(
    streamChatState != null,
    'You must have a ChannelsBloc widget as ancestor',
  );

  return streamChatState!;
}