Create room without connecting (#49)

* initial commit

* fix example compile

* format

* clean up

* fix check

* missing import
This commit is contained in:
Hiroshi Horie
2021-12-07 17:02:58 +07:00
committed by GitHub
parent c4e56af4c0
commit 0f5a758cd4
5 changed files with 73 additions and 87 deletions
+10 -2
View File
@@ -11,10 +11,18 @@ class LiveKitClient {
String url,
String token, {
ConnectOptions? options,
}) =>
Room.connect(
}) async {
final room = Room();
try {
await room.connect(
url,
token,
options: options,
);
return room;
} catch (error) {
await room.dispose();
rethrow;
}
}
}