# ChatState.fromName constructor

ChatState.fromName(

1. String state

)

## Implementation

    factory ChatState.fromName(String state) {
      switch (state) {
        case 'active':
          return ChatState.active;
        case 'composing':
          return ChatState.composing;
        case 'paused':
          return ChatState.paused;
        case 'inactive':
          return ChatState.inactive;
        case 'gone':
          return ChatState.gone;
      }

      throw Exception('Invalid chat state $state');
    }