setScreenSharing method

Future<void> setScreenSharing(
  1. bool isSharing
)

Implementation

Future<void> setScreenSharing(bool isSharing) async {
  isSharingScreen = isSharing;

  if (!isSharing) {
    screenSource?.dispose();
    screenSource = null;
  }
}