MethodChannelXScreenSourcesBackend class
Production XScreenSourcesBackend: ux/screen_sources for commands.
- Implemented types
Constructors
- MethodChannelXScreenSourcesBackend()
-
Creates a backend bound to the
ux/screen_sourceschannel.
Properties
- captureMode → XScreenCaptureMode?
-
How this platform family shares a screen, or
nullwhere it shares none at all. Independent of supported: a family names its mode even where no capture ships for it.no setteroverride - hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- supported → bool
-
Whether this platform family serves these calls. Elsewhere every method
throws XScreenSourcesException with code
unsupported, before it looks at its arguments — and so does every call the family's captureMode has no role for: list and the permission pair off XScreenCaptureMode.pickerDriven, startShare and stopShare off XScreenCaptureMode.consentDriven.no setteroverride
Methods
-
available(
) → Future< bool> -
Whether this host can serve its captureMode — the platform family and
the OS version, plus whatever else the platform makes a capture depend
on: on iOS this is ReplayKit's own answer, false while the app is not in
front, a mirrored display is attached, or another recorder holds the
screen, and on Android it is false unless the app's pubspec sets
ux: enable_media_projection: true.override -
hasPermission(
) → Future< bool> -
Whether screen recording is granted. Never prompts.
override
-
list(
{required Set< String> allowedDisplayIds, required Set<String> allowedWindowIds, int thumbnailWidth = 320, int thumbnailHeight = 180}) → Future<List< XScreenSource> > -
The allowed sources present right now, each with a
thumbnailWidth×thumbnailHeightaspect-fit PNG.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
requestPermission(
) → Future< bool> -
Asks for screen-recording access, returning the state the call leaves
behind.
override
-
Takes the hold a consent-driven capture runs inside, showing an ongoing
notification titled
notificationTitlewithnotificationTextunder it.override -
Drops the hold startShare took. Dropping one nobody holds succeeds.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited