StacPlaceholder class
A Stac model representing Flutter's Placeholder
widget.
Draws a simple box to visualize where a widget will be added in the future. Useful during development to indicate unimplemented parts of the UI.
Dart Example:
StacPlaceholder(
fallbackWidth: 200,
fallbackHeight: 100,
strokeWidth: 2,
)
JSON Example:
{
"type": "placeholder",
"fallbackWidth": 200,
"fallbackHeight": 100,
"strokeWidth": 2
}
See also:
- Flutter's Placeholder documentation (
https://api.flutter.dev/flutter/widgets/Placeholder-class.html
)
- Inheritance
-
- Object
- StacElement
- StacWidget
- StacPlaceholder
- Annotations
-
- @JsonSerializable(explicitToJson: true)
Constructors
- StacPlaceholder.new({double? fallbackWidth, double? fallbackHeight, double? strokeWidth, String? color, StacWidget? child})
-
Creates a StacPlaceholder.
const
-
StacPlaceholder.fromJson(Map<
String, dynamic> json) -
Creates a StacPlaceholder from a JSON map.
factory
Properties
- child → StacWidget?
-
Optional child to display inside the placeholder.
final
- color → String?
-
The color of the placeholder's stroke.
final
- fallbackHeight → double?
-
The height to use when the placeholder has unconstrained height.
final
- fallbackWidth → double?
-
The width to use when the placeholder has unconstrained width.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
jsonData
→ Map<
String, dynamic> ? -
Raw JSON data for this widget
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- strokeWidth → double?
-
The stroke width used to draw the placeholder borders.
final
- type → String
-
Widget type identifier.
no setteroverride
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Converts this StacPlaceholder to a JSON map.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited