Skip to content
Get started
Menu
Get started

Image

Host images for KYC photos, bank logos and promotion media.

Bank logo images in loaded, loading and failed states, plus decorative, list and accordion uses.Bank logo images in loaded, loading and failed states, plus decorative, list and accordion uses.
Image

The dark specimen preserves a known gallery fixture bug: the synthetic logo’s white letters have little contrast against its light tile. See issue #173.

example/lib/screens/gallery_layout.dart
PaymentImage(image: provider, alt: 'Bank Contoh');

Variants: loading, loaded, failed.

Situation Variant / composition Payment example
Synthetic document preview loaded Pass a host ImageProvider and alt; empty alt means decorative.

Use Icon for a symbolic status mark.

The image fades in over its placeholder; instant under reduced motion.

The image preserves its loading surface and handles decode failure. It fades in when loaded, with no fade under reduced motion.

Do: Pass a host ImageProvider and alt; empty alt means decorative.

Don’t: Construct a network image in the kit.

Supply alt text that explains the image’s purpose. Use an empty alt for decorative images.

Meaningful images need alt text. Decorative images use an empty alt so they do not interrupt reading order.

PaymentImage

class PaymentImage extends StatelessWidget · lib/src/layout/content.dart

A host-supplied image with alt text, loading and error states.

ParameterTypeDefaultDescription
image:requiredImageProvider—The host supplies the image provider.
alt:requiredString—Image alternative; empty makes the image decorative.
width:double?—Optional width.
height:double?—Optional height.
fit:BoxFitBoxFit.coverImage fit.
radius:PaymentRadiusPaymentRadius.noneCorner role.
bordered:boolfalseDraw an outline over the image.
placeholder:Widget?—Host loading content.
errorFallback:Widget?—Host failure content, including its own semantics.

PaymentRadius

enum PaymentRadius · lib/src/foundation/payment_tokens.dart

Corner roles for PaymentBox and PaymentImage.

ValueDescription
noneBorderRadius.zero.
tagtagBorderRadius (4 by default).
controlcontrolBorderRadius (6 by default).
boxborderRadius (8 by default).
sheetsheetBorderRadius (12 by default).
circleBorderRadius.circular(999), existing navigation pill.