ImageStyle class

A configuration class that defines how an image should be displayed in the Arcane UI.

ImageStyle provides a flexible way to specify image sizing, positioning, blending, and alignment, ensuring consistent visual presentation across components. It supports efficient rendering without unnecessary computations due to its const constructor.

Key features:

  • Supports various BoxFit modes (excluding scaleDown and none for optimal display).
  • Allows color blending for tinted or overlaid effects.
  • Configurable width, height, and alignment for precise layout control.

Usage in Arcane UI:

Performance notes:

  • Const constructor prevents rebuilds in stateless contexts.
  • Minimal properties ensure low memory footprint and fast equality checks.

Constructors

ImageStyle({BoxFit fit = BoxFit.contain, double width = double.infinity, double height = double.infinity, Color? color, BlendMode? colorBlendMode, AlignmentGeometry? alignment})
Creates an ImageStyle configuration for consistent image display.
const

Properties

alignment AlignmentGeometry?
Alignment of the image within its bounds.
final
color Color?
Color to blend with the image.
final
colorBlendMode BlendMode?
Blend mode for applying the color.
final
fit BoxFit
How the image should be inscribed into the space.
final
hashCode int
The hash code for this object.
no setterinherited
height double
Height of the image.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
width double
Width of the image.
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.
inherited