ImageMetadata class

Image metadata with source and dimensions.

Captures <img> elements and inline <svg> elements with metadata for image analysis and optimization.

Examples

let img = ImageMetadata {
    src: "https://example.com/image.jpg".to_string(),
    alt: Some("An example image".to_string()),
    title: Some("Example".to_string()),
    dimensions: Some((800, 600)),
    image_type: ImageType::External,
    attributes: Default::default(),
};

assert_eq!(img.image_type, ImageType::External);

Constructors

ImageMetadata({required String src, String? alt, String? title, Int64List? dimensions, required ImageType imageType, required Map<String, String> attributes})
const

Properties

alt String?
Alternative text from alt attribute (for accessibility)
final
attributes Map<String, String>
Additional HTML attributes
final
dimensions → Int64List?
Image dimensions as (width, height) if available
final
hashCode int
The hash code for this object.
no setteroverride
imageType ImageType
Image type classification
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
src String
Image source (URL, data URI, or SVG content identifier)
final
title String?
Title attribute (often shown as tooltip)
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override