CssBackgroundSize class sealed
CSS background-size property values.
- Implemented types
Constructors
- CssBackgroundSize.global(CssGlobal global)
-
Global keyword (inherit, initial, unset, revert).
factory
-
CssBackgroundSize.multiple(List<
CssBackgroundSize> sizes) -
Creates a background size with multiple values (comma-separated).
factory
- CssBackgroundSize.raw(String value)
-
Raw CSS value escape hatch.
factory
- CssBackgroundSize.size(CssLength width, [CssLength? height])
-
Creates a background size with width and optional height.
If height is omitted, it defaults to auto.
factory
- CssBackgroundSize.variable(String varName)
-
CSS variable reference.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toCss(
) → String -
Converts this value to its CSS string representation.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- auto → const CssBackgroundSize
-
The
autokeyword which scales the background image in the corresponding direction such that its intrinsic proportion is maintained. - contain → const CssBackgroundSize
- Scales the image to the largest size such that both its width and its height can fit inside the content area.
- cover → const CssBackgroundSize
- Scales the image as large as possible without stretching the image. If the container is larger than the image, this will result in image tiling, unless the background-repeat property is set to no-repeat.