ScreenSelectDialog constructor

ScreenSelectDialog(
  1. {Key? key}
)

Implementation

ScreenSelectDialog({Key? key}) : super(key: key) {
  Future.delayed(const Duration(milliseconds: 100), () {
    _getSources();
  });
  _subscriptions.add(rtc.desktopCapturer.onAdded.stream.listen((source) {
    _sources[source.id] = source;
    _stateSetter?.call(() {});
  }));

  _subscriptions.add(rtc.desktopCapturer.onRemoved.stream.listen((source) {
    _sources.remove(source.id);
    _stateSetter?.call(() {});
  }));

  _subscriptions
      .add(rtc.desktopCapturer.onThumbnailChanged.stream.listen((source) {
    _stateSetter?.call(() {});
  }));
}