Description
RoomConnectionScope is a widget that manages the connection lifecycle for a MeshAgent RoomClient.
- authorization:
Future<RoomConnectionInfo> Function()that returns URL/JWT (or use helpers likestaticAuthorization/developmentAuthorization). - builder:
(BuildContext, RoomClient)called when the client is ready. - authorizingBuilder (optional): UI while fetching auth.
- connectingBuilder (optional): UI while connecting after auth is fetched.
- doneBuilder (optional): UI when the connection ends or errors.
- onReady (optional): Callback invoked when the client is connected (after messaging is enabled if configured).
- enableMessaging (default true): Auto-enable messaging on connect.
- oauthTokenRequestHandler (optional): Handle OAuth prompts from
secrets.request_oauth_token. - client (optional string): Client identifier passed to the SDK.
- Returns:
Widgetthat rebuilds based on connection state.