disposeScreenShare method
Implementation
Future<void> disposeScreenShare() async {
if (room.localParticipant?.isScreenShareEnabled() == true) {
final participant = room.localParticipant;
await participant?.setScreenShareEnabled(false);
if (lkPlatformIs(PlatformType.android)) {
// Android specific
try {
await FlutterBackground.disableBackgroundExecution();
} catch (error) {
if (kDebugMode) {
print('error disabling screen share: $error');
}
}
}
}
}