MediaSlotImage class
Trusted image delivery for one declared media slot, shared by a system's photo and avatar components. fallback stands in while the picture is pending and whenever it misses, so a pending image never delays layout, first paint or publication.
A bundled picture starts at once, even while the optional remote manifest is still loading. A remote one that fails retries while mounted — after 2 s, then one second longer each time up to 10 s, for at most 15 minutes — except a 404, which is terminal; disposal cancels any pending retry.
const MediaSlotImage(slotId: 'hero', fallback: ColoredBox(color: Color(0xFFDDDDDD)))
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- MediaSlotImage
Constructors
- MediaSlotImage({required String slotId, required Widget fallback, BoxFit fit = BoxFit.cover, AlignmentGeometry alignment = Alignment.center, Key? key})
-
Creates a MediaSlotImage.
const
Properties
- alignment → AlignmentGeometry
-
Where the picture sits in its box when fit crops it (a subject low
in the frame pinned
bottomCenter).final - fallback → Widget
-
What stands in while the picture is pending or missing: the system's
deterministic placeholder.
final
- fit → BoxFit
-
How the picture fills its box.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- slotId → String
-
The declared slot id.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< MediaSlotImage> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited