ScreenSelectDialog constructor

ScreenSelectDialog({
  1. Key? key,
  2. String titleText = 'Choose what to share',
  3. String screenTabText = 'Entire Screen',
  4. String windowTabText = 'Window',
  5. String cancelText = 'Cancel',
  6. String shareText = 'Share',
})

Implementation

ScreenSelectDialog({
  Key? key,
  this.titleText = 'Choose what to share',
  this.screenTabText = 'Entire Screen',
  this.windowTabText = 'Window',
  this.cancelText = 'Cancel',
  this.shareText = 'Share',
}) : super(key: key) {
  Timer(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(() {});
  }));
}