This commit is contained in:
John Smith
2022-09-09 16:27:13 -04:00
parent b13f8947df
commit 72b03939ef
10 changed files with 99 additions and 51 deletions

View File

@@ -35,7 +35,7 @@ class VeilidJS implements Veilid {
}
@override
Stream<VeilidUpdate> startupVeilidCore(VeilidConfig config) async* {
Future<Stream<VeilidUpdate>> startupVeilidCore(VeilidConfig config) async {
var streamController = StreamController<VeilidUpdate>();
updateCallback(String update) {
var updateJson = jsonDecode(update);
@@ -51,7 +51,8 @@ class VeilidJS implements Veilid {
js.allowInterop(updateCallback),
jsonEncode(config.json, toEncodable: veilidApiToEncodable)
]));
yield* streamController.stream;
return streamController.stream;
}
@override