ImageSpec class final
Specification for image styling properties.
Provides comprehensive image styling including dimensions, color, fit, alignment, filtering, and semantic properties.
- Implemented types
- Annotations
-
- @MixableSpec.new(target: StyledImage.new)
- @immutable
Constructors
-
ImageSpec({ImageProvider<
Object> ? image, double? width, double? height, Color? color, ImageRepeat? repeat, BoxFit? fit, AlignmentGeometry? alignment, Rect? centerSlice, FilterQuality? filterQuality, BlendMode? colorBlendMode, String? semanticLabel, bool? excludeFromSemantics, bool? gaplessPlayback, bool? isAntiAlias, bool? matchTextDirection}) -
const
Properties
- alignment → AlignmentGeometry?
-
How to align the image within its bounds.
final
- centerSlice → Rect?
-
The center slice for nine-patch images.
final
- color → Color?
-
The color to blend with the image.
final
- colorBlendMode → BlendMode?
-
The blend mode to use when drawing the image.
final
- excludeFromSemantics → bool?
-
Whether to exclude the image from semantics.
final
- filterQuality → FilterQuality?
-
The rendering quality of the image.
final
- fit → BoxFit?
-
How to inscribe the image into the space.
final
- gaplessPlayback → bool?
-
Whether to continue showing the old image when the image provider changes.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
The height of the image.
final
-
image
→ ImageProvider<
Object> ? -
The image to display.
final
- isAntiAlias → bool?
-
Whether to paint the image with anti-aliasing.
final
- matchTextDirection → bool?
-
Whether to paint the image in the direction of the text.
final
-
props
→ List<
Object?> -
The properties based on which equality and hash code are computed.
no setterinherited
- repeat → ImageRepeat?
-
How to repeat the image if it doesn't fill the box.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semanticLabel → String?
-
A semantic description of the image.
final
- stringify → bool
-
Whether to use a detailed string representation of the object.
no setterinherited
- type → Type
-
no setterinherited
- width → double?
-
The width of the image.
final
Methods
-
copyWith(
{ImageProvider< Object> ? image, double? width, double? height, Color? color, ImageRepeat? repeat, BoxFit? fit, AlignmentGeometry? alignment, Rect? centerSlice, FilterQuality? filterQuality, BlendMode? colorBlendMode, String? semanticLabel, bool? excludeFromSemantics, bool? gaplessPlayback, bool? isAntiAlias, bool? matchTextDirection}) → ImageSpec -
Creates a copy of this spec with the given fields
replaced by the non-null parameter values.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
getDiff(
Equatable other) → Map< String, String> -
Returns a map of properties that differ between this object and another.
inherited
-
lerp(
covariant ImageSpec? other, double t) → ImageSpec -
Linearly interpolates with another Spec object.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringShort(
) → String -
A brief description of this object, usually just the runtimeType and the
hashCode.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited