StacVisibility class
A Stac model representing Flutter's Visibility
widget.
Controls the visibility of its child widget.
StacVisibility(
visible: true,
child: StacText(data: 'Visible Text'),
replacement: StacText(data: 'Replacement when not visible'),
)
{
"type": "visibility",
"visible": true,
"child": {"type": "text", "data": "Visible Text"},
"replacement": {"type": "text", "data": "Replacement when not visible"}
}
- Inheritance
-
- Object
- StacElement
- StacWidget
- StacVisibility
- Annotations
-
- @JsonSerializable()
Constructors
- StacVisibility.new({bool? visible, StacWidget? child, StacWidget? replacement, bool? maintainState, bool? maintainAnimation, bool? maintainSize, bool? maintainSemantics, bool? maintainInteractivity})
-
Creates a StacVisibility with the given properties.
const
-
StacVisibility.fromJson(Map<
String, dynamic> json) -
Creates a StacVisibility from JSON.
factory
Properties
- child → StacWidget?
-
The widget to show or hide.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
jsonData
→ Map<
String, dynamic> ? -
Raw JSON data for this widget
finalinherited
- maintainAnimation → bool?
-
Whether to maintain the Animation of the child when it is not visible.
Defaults to false.
final
- maintainInteractivity → bool?
-
Whether to maintain the Interactivity of the child when it is not visible.
Defaults to false.
final
- maintainSemantics → bool?
-
Whether to maintain the Semantics of the child when it is not visible.
Defaults to false.
final
- maintainSize → bool?
-
Whether to maintain the Size of the child when it is not visible.
Defaults to false.
final
- maintainState → bool?
-
Whether to maintain the State of the child when it is not visible.
Defaults to false.
final
- replacement → StacWidget?
-
The widget to show when the child is not visible.
If null, and maintainState, maintainAnimation, maintainSize,
maintainSemantics, and maintainInteractivity are all false,
then the child is simply not included in the tree.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → String
-
Widget type identifier.
no setteroverride
- visible → bool?
-
Whether the child is visible.
Defaults to true in the Flutter widget.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Converts this StacVisibility to JSON.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited