read static method
Gets the QuickRTCController instance without listening for changes.
Use this when you need to call methods on the controller but don't need to rebuild when state changes.
Example:
final controller = QuickRTCProvider.read(context);
await controller.joinMeeting(...);
Implementation
static QuickRTCController read(BuildContext context) {
final provider = context.getInheritedWidgetOfExactType<QuickRTCProvider>();
if (provider == null) {
throw FlutterError(
'QuickRTCProvider.read() called with a context that does not contain a QuickRTCProvider.\n'
'Make sure to wrap your widget tree with QuickRTCProvider.',
);
}
return provider.controller;
}