show static method

  1. @experimental
Future<String?> show(
  1. BuildContext context, {
  2. String titleText = 'Choose what to share',
  3. String screenTabText = 'Entire Screen',
  4. String windowTabText = 'Window',
  5. String cancelText = 'Cancel',
  6. String shareText = 'Share',
})

Shows the picker and returns the id of the selected capture source, or null if the user cancelled. Pass the returned id to ScreenShareCaptureOptions.sourceId when creating a screen share track.

Experimental: this API may change in a future release.

Implementation

@experimental
static Future<String?> show(
  BuildContext context, {
  String titleText = 'Choose what to share',
  String screenTabText = 'Entire Screen',
  String windowTabText = 'Window',
  String cancelText = 'Cancel',
  String shareText = 'Share',
}) async {
  final source = await showDialog<rtc.DesktopCapturerSource>(
    context: context,
    builder: (context) => ScreenSelectDialog(
      titleText: titleText,
      screenTabText: screenTabText,
      windowTabText: windowTabText,
      cancelText: cancelText,
      shareText: shareText,
    ),
  );
  return source?.id;
}