SimplePip class

Main controller class. It can verify whether the system supports PIP, check whether the app is currently in PIP mode, request entering PIP mode, and call some callbacks when the app changes its mode.

Constructors

SimplePip({VoidCallback? onPipEntered, VoidCallback? onPipExited, dynamic onPipAction(PipAction)?})

Properties

hashCode int
The hash code for this object.
no setterinherited
onPipAction ↔ dynamic Function(PipAction)?
Called when the user taps on a PIP action
getter/setter pair
onPipEntered VoidCallback?
Called when the app enters PIP mode
getter/setter pair
onPipExited VoidCallback?
Called when the app exits PIP mode
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

enterPipMode({AspectRatio aspectRatio = (16, 9), bool autoEnter = false, bool seamlessResize = false}) Future<bool>
Request entering PIP mode
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setAutoPipMode({AspectRatio aspectRatio = (16, 9), bool seamlessResize = false, bool autoEnter = true}) Future<bool>
Request setting automatic PIP mode. Android 12 (Android S, API level 31) or newer required.
setIsPlaying(bool isPlaying) Future<bool>
Updates the actions PipAction.play and PipAction.pause When it is called it does re-render the action inside PIP acording with isPlaying value
setPipActionsLayout(PipActionsLayout layout) Future<bool>
Updates the current actions layout with a preset layout The preset layout is defined by PipActionsLayout and it's equivalent enum inside Android src
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

isAutoPipAvailable Future<bool>
Whether the device supports AutoEnter PIP parameter (Android S)
no setter
isPipActivated Future<bool>
Whether the app is currently in PIP mode.
no setter
isPipAvailable Future<bool>
Whether this device supports PIP mode.
no setter