ScreenCaptureSourceInfo

The information about the specified shareable window or screen.

class ScreenCaptureSourceInfo {
  const ScreenCaptureSourceInfo(
      {this.type,
      this.sourceId,
      this.sourceName,
      this.thumbImage,
      this.iconImage,
      this.processPath,
      this.sourceTitle,
      this.primaryMonitor,
      this.position,
      this.minimizeWindow,
      this.sourceDisplayId});

  @JsonKey(name: 'type')
  final ScreenCaptureSourceType? type;

  @JsonKey(name: 'sourceId')
  final int? sourceId;

  @JsonKey(name: 'sourceName')
  final String? sourceName;

  @JsonKey(name: 'thumbImage')
  final ThumbImageBuffer? thumbImage;

  @JsonKey(name: 'iconImage')
  final ThumbImageBuffer? iconImage;

  @JsonKey(name: 'processPath')
  final String? processPath;

  @JsonKey(name: 'sourceTitle')
  final String? sourceTitle;

  @JsonKey(name: 'primaryMonitor')
  final bool? primaryMonitor;

  @JsonKey(name: 'position')
  final Rectangle? position;

  @JsonKey(name: 'minimizeWindow')
  final bool? minimizeWindow;

  @JsonKey(name: 'sourceDisplayId')
  final int? sourceDisplayId;

  factory ScreenCaptureSourceInfo.fromJson(Map<String, dynamic> json) =>
      _$ScreenCaptureSourceInfoFromJson(json);

  Map<String, dynamic> toJson() => _$ScreenCaptureSourceInfoToJson(this);
}

Attributes

type
The type of the shared target. See ScreenCaptureSourceType.
sourceId
The window ID for a window or the display ID for a screen.
sourceName
The name of the window or screen. UTF-8 encoding.
thumbImage
The image content of the thumbnail. See ThumbImageBuffer.
iconImage
The image content of the icon. See ThumbImageBuffer.
processPath
The process to which the window belongs. UTF-8 encoding.
sourceTitle
The title of the window. UTF-8 encoding.
primaryMonitor
Determines whether the screen is the primary display:
  • true: The screen is the primary display.
  • false: The screen is not the primary display.
position
The position of a window relative to the entire screen space (including all shareable screens). See Rectangle.
minimizeWindow
(For Windows only) Whether the window is minimized:
  • true: The window is minimized.
  • false: The window is not minimized.
sourceDisplayId
(For Windows only) Screen ID where the window is located. If the window is displayed across multiple screens, this parameter indicates the ID of the screen with which the window has the largest intersection area. If the window is located outside of the visible screens, the value of this member is -2.