chore: Update SDK and add webworker support for web

This commit is contained in:
Christian Pauly 2022-08-14 16:31:36 +02:00
commit da7e433ea3
6 changed files with 33457 additions and 6 deletions

View file

@ -83,6 +83,10 @@ abstract class ClientManager {
await Store().setItem(clientNamespace, jsonEncode(clientNamesList));
}
static NativeImplementations get nativeImplementations => kIsWeb
? NativeImplementationsWebWorker(Uri.parse('native_executor.js'))
: NativeImplementationsIsolate(compute);
static Client createClient(String clientName) {
return Client(
clientName,
@ -109,7 +113,7 @@ abstract class ClientManager {
PlatformInfos.isMacOS)
AuthenticationTypes.sso
},
compute: compute,
nativeImplementations: nativeImplementations,
customImageResizer: PlatformInfos.isMobile ? customImageResizer : null,
);
}