PipExpanded class
Full screen: the media fills the screen and content is composited on top.
Constructors
- PipExpanded({required CampaignCanvas canvas, double designWidth = defaultCampaignCanvasDesignWidth, bool cover = true, Color? backgroundColor, double scrimOpacity = 0.55, bool showCloseButton = true, bool closeOnLeft = false, PipExpandedClose onClose = PipExpandedClose.collapse, PipExpandedClose onBack = PipExpandedClose.collapse, bool showPlaybackControls = false, bool showMute = true, bool unmuteOnExpand = false, Duration transition = const Duration(milliseconds: 500), double iconSize = 20, PipEdges controlsMargin = const PipEdges(top: 4, right: 12, bottom: 0, left: 12)})
-
const
Properties
- backgroundColor → Color?
-
Behind the media — the letterbox bars under
contain.final - canvas → CampaignCanvas
-
The canvas composited over the media, drawn by the shared canvas renderer.
final
- closeOnLeft → bool
-
True when the × sits in the top-left rather than the top-right.
final
- controlsMargin → PipEdges
-
final
- cover → bool
-
coverfills and may crop;containletterboxes and never crops.final - designWidth → double
-
The logical width the canvas rects were authored against.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- iconSize → double
-
Diameter of a full-screen chrome glyph (×, collapse, play/pause, mute),
in logical pixels. The pill around it and the content-safe chrome band
both scale with this (
_expandedChromePillHeight/_expandedChromeBandHeightin the renderer) — the dashboard derives the SAME band from this same value (designSpace.ts'spipChromeBands), so the expanded canvas's available height and the real chrome stay in agreement.final - onBack → PipExpandedClose
-
What the Android/Flutter back gesture does. Separate from onClose
because the two are different intents: × is an explicit "I am done with
this", back is "undo the last step". Defaults to
collapsefor that reason, and authors who want back to end the campaign can say so.final - onClose → PipExpandedClose
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrimOpacity → double
-
Strength of the dark wash between media and content, 0–1. Content sits ON
the media, so without this, copy over a bright frame is unreadable.
final
- showCloseButton → bool
-
final
- showMute → bool
-
The mute toggle in full screen, separate from the collapsed window's.
final
- showPlaybackControls → bool
-
Play/pause only, and off by default. There is deliberately no progress
bar in full screen — a scrubber pinned to the bottom edge fights the CTA
that lives there — and the play/pause button goes the same way: the top
corners are for leaving (×) and for sound (mute), the bottom is the CTA's,
and a third control competes with both.
final
- transition → Duration
-
final
- unmuteOnExpand → bool
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromJson(
Map< String, dynamic> ? json, {DesignTokenCatalog designTokens = DesignTokenCatalog.empty}) → PipExpanded? -
Returns null when the expanded canvas is missing or unparseable — with
onTap: expandas the default, a PiP that cannot open is a dead end, so the whole campaign is dropped rather than shipped half-working.