reference property

MinimalMediaReference? Function(BuildContext context, String value)? reference
getter/setter pair

Reads a picture value that is no plain slot id: an app's own reference to a photo it stored, one on this device, a link. A record's picture field holds a slot id or such a reference; MinimalMedia.media and MinimalAvatar(media:) ask this for every value they are given. Its answer names the slot the value stands for, or the image that draws it; an answer with neither draws the placeholder, and null (or no reader) takes the value as a slot id. The app sets it once.

MinimalMediaSource.reference = (context, value) => value.startsWith('https:') ? (slot: null, image: NetworkImage(value)) : null

Implementation

static MinimalMediaReference? Function(BuildContext context, String value)?
reference;