StacVisualDensity class
A Stac model representing Flutter's VisualDensity class.
Defines the visual density of a widget, which affects the size of interactive elements like buttons and form fields.
StacVisualDensity(
horizontal: -1.0,
vertical: -1.0,
)
{
"horizontal": -1.0,
"vertical": -1.0
}
- Inheritance
-
- Object
- StacElement
- StacVisualDensity
- Available extensions
- Annotations
-
- @JsonSerializable.new()
Constructors
- StacVisualDensity({double? horizontal, double? vertical})
-
Creates a StacVisualDensity with the given density values.
const
-
StacVisualDensity.fromJson(Map<
String, dynamic> json) -
Creates a StacVisualDensity from JSON.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- horizontal → double?
-
The horizontal density adjustment.
Negative values make the widget more compact horizontally.
final
- parse → VisualDensity
-
Available on StacVisualDensity, provided by the StacVisualDensityParser extension
no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- vertical → double?
-
The vertical density adjustment.
Negative values make the widget more compact vertically.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Converts this visual density to JSON.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited