chore: Do not create VoipPlugin on not supported platforms

This commit is contained in:
Krille Fear 2022-02-17 19:46:02 +01:00
commit 04ba24b6a6
3 changed files with 10 additions and 9 deletions

View file

@ -83,7 +83,10 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
return widget.clients[_activeClient];
}
VoipPlugin get voipPlugin => VoipPlugin(client: client, context: context);
bool get webrtcIsSupported => PlatformInfos.isMobile;
VoipPlugin? get voipPlugin =>
webrtcIsSupported ? VoipPlugin(client: client, context: context) : null;
bool get isMultiAccount => widget.clients.length > 1;