of static method

Use this method to get the current StreamChatState instance

Implementation

static MessageInputState of(BuildContext context) {
  MessageInputState? messageInputState;
  messageInputState = context.findAncestorStateOfType<MessageInputState>();
  assert(
    messageInputState != null,
    'You must have a MessageInput widget as ancestor of your widget tree',
  );
  return messageInputState!;
}