MinimalMedia class
An image in the theme's shapes.small inside a hairline — real corpus imagery
for a declared media slot, or Minimal's placeholder while it is
pending: a muted, deterministic gradient under a faint diagonal hatch,
the drafting-table sign for "an image goes here".
MinimalMedia.media renders the photograph resolved for one of the plan's
declared media slots (assets/media/<slot>.jpg, or the durable
reference assets/media/remote.json maps it to). While a linked photo
is still being made the placeholder carries a slow sheen, and the photo
replaces it when it lands. An unresolved or failed slot paints the
placeholder seeded from the slot id — a page is never wrong to
reference a declared slot. For an API that takes an ImageProvider,
MinimalMediaSource.image is the same slot. The positional form keeps the
pure
placeholder for imagery no slot covers. Decorative unless given a
semanticLabel.
MinimalMedia.media('hero-bakery', height: 180)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- MinimalMedia
Constructors
- MinimalMedia(MinimalPlaceholderImage src, {Key? key, double? width, double? height, double? radius, OutlinedBorder? shape, BoxFit fit = BoxFit.cover, String? semanticLabel})
-
The placeholder
srcin a frame.const - MinimalMedia.media(String media, {Key? key, double? width, double? height, double? radius, OutlinedBorder? shape, BoxFit fit = BoxFit.cover, String? semanticLabel})
-
The photograph resolved for the declared plan media slot
media.const
Properties
- fit → BoxFit
-
How a photograph sits in its frame. The placeholder always covers its
box.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
Its height; null leaves it to the parent.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- media → String?
-
The declared media slot id, in the media form.
final
- radius → double?
-
One corner radius for this image; null takes shape.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semanticLabel → String?
-
What the image shows, for a screen reader. Null leaves the image
decorative (silent).
final
- shape → OutlinedBorder?
-
The frame's outline; null (with no radius) takes the theme's
shapes.small, so the image follows the corner setting.final - src → MinimalPlaceholderImage?
-
The placeholder it draws; null for a slot's photograph.
final
- width → double?
-
Unstated, the image FILLS THE CROSS AXIS — see the note in build.
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
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