stateOf static method

QuickRTCState stateOf(
  1. BuildContext context
)

Gets the current QuickRTCState and listens for changes.

Shorthand for QuickRTCProvider.of(context).state.

Example:

final state = QuickRTCProvider.stateOf(context);
if (state.isConnected) {
  // ...
}

Implementation

static QuickRTCState stateOf(BuildContext context) {
  return of(context).state;
}