PdfElement.image constructor
const
PdfElement.image({})
An image element that can load from a URL, local path, asset, or Base64.
Implementation
const factory PdfElement.image({
/// Optional key to control visibility.
String? visibleIfKey,
/// The image source (e.g., "http://...", "path/to/file", "data:image/...").
String? imageSource,
/// Optional key to fetch the image source dynamically from data.
String? dataKey,
/// Width of the image in points.
@Default(100.0) double width,
/// Height of the image in points.
@Default(100.0) double height,
/// Alignment of the image within its container.
@Default(PdfTextAlignment.center) PdfTextAlignment alignment,
}) = PdfImageElement;