UTDPipController class
Drives Android OS-level Picture-in-Picture for the audio room, alongside the in-app minimize overlay (UTDMinimizeController).
Mechanism mirrors a typical prebuilt audio-room kit: it delegates to the floating
plugin's OnLeavePiP, which on Android 12+ (API 31+) sets
setAutoEnterEnabled(true) so the OS auto-enters a system PiP window when
the user backgrounds the app (Home gesture) while on the room screen.
"In-room only" is enforced by lifecycle: armIfEnabled is called when the room widget is mounted and connected; disarm is called when it is disposed (minimized → overlay on the home feed, or leaving) and on room teardown — so backgrounding from anywhere but the live room never triggers PiP.
Android-only: every method is a no-op on other platforms (the floating
MethodChannel is not registered on iOS, so calls are guarded to avoid
MissingPluginException). iOS / Android < 31 keep using the overlay.
Constructors
- UTDPipController(UTDRoomController _controller)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
isInPip
→ ValueNotifier<
bool> -
truewhile the app is actually shrunk into the system PiP window. UTDLiveRoom swaps its body to the compact PiP view while this istrue.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
armIfEnabled(
) → Future< void> - Arms auto-enter-on-Home if PiP is enabled in config and supported by the device. Safe to call repeatedly (re-arms). No-op on iOS, when disabled in config, or when unavailable.
-
disarm(
) → Future< void> - Cancels auto-enter so backgrounding no longer triggers PiP. Called when the room screen is no longer the foreground (minimized / left). No-op on iOS.
-
dispose(
) → void -
Final teardown — call from UTDRoomController.dispose. Disposes isInPip
and cancels any pending auto-enter. Does NOT dispose the
floatingsingleton (it is shared process-wide). -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setInPip(
bool inPip) → void - Reports the real OS PiP enter/exit transition.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited