StacRefreshIndicator class
A Stac model representing Flutter's RefreshIndicator widget.
A widget that supports the Material "swipe to refresh" idiom.
StacRefreshIndicator(
onRefresh: StacAction(type: 'myCustomRefreshAction'),
child: StacListView(
children: [StacText(data: 'Pull me down')],
),
displacement: 60,
edgeOffset: 10.0,
color: StacColor(value: 0xFFFFFFFF),
backgroundColor: StacColor(value: 0xFF0000FF),
)
{
"type": "refreshIndicator",
"onRefresh": {"type": "myCustomRefreshAction"},
"child": {
"type": "listView",
"children": [{"type": "text", "data": "Pull me down"}]
},
"displacement": 60.0,
"edgeOffset": 10.0,
"color": {"value": 0xFFFFFFFF},
"backgroundColor": {"value": 0xFF0000FF}
}
- Inheritance
-
- Object
- StacElement
- StacWidget
- StacRefreshIndicator
- Available extensions
- Annotations
-
- @JsonSerializable.new()
Constructors
- StacRefreshIndicator({required StacWidget? child, required StacAction? onRefresh, double? displacement, double? edgeOffset, StacColor? color, StacColor? backgroundColor, String? semanticsLabel, String? semanticsValue, double? strokeWidth, StacRefreshIndicatorTriggerMode? triggerMode})
-
Creates a StacRefreshIndicator.
const
-
StacRefreshIndicator.fromJson(Map<
String, dynamic> json) -
Creates a StacRefreshIndicator from JSON.
factory
Properties
- backgroundColor → StacColor?
-
The progress indicator's background color.
final
- child → StacWidget?
-
The widget below this widget in the tree.
final
- color → StacColor?
-
The progress indicator's foreground color.
final
- displacement → double?
-
The distance from the child's top or bottom edge indicates how far the
refresh indicator can be dragged to trigger a refresh.
Defaults to 40.0 in the Flutter widget.
final
- edgeOffset → double?
-
The offset where the refresh indicator appears from the edge of the
scrollable content.
Defaults to 0.0 in the Flutter widget.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
jsonData
→ Map<
String, dynamic> ? -
Raw JSON data for this widget
finalinherited
- onRefresh → StacAction?
-
A StacAction that's called when the user has dragged the refresh indicator
far enough to demonstrate that they want the app to refresh.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semanticsLabel → StacColor?
-
The semantic label for the indicator.
final
- semanticsValue → StacColor?
-
The semantic value for the indicator.
final
- strokeWidth → double?
-
The thickness of the
RefreshProgressIndicatorcircle, in logical pixels. Defaults toRefreshProgressIndicator.defaultStrokeWidth(2.0) in the Flutter widget.final - triggerMode → StacRefreshIndicatorTriggerMode?
-
Defines how this widget can be triggered.
Defaults to StacRefreshIndicatorTriggerMode.onEdge in the Flutter widget.
final
- type → String
-
Widget type identifier.
no setteroverride
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parse(
BuildContext context) → Widget? -
Available on StacWidget?, provided by the StacWidgetParser extension
-
parsePreferredSizeWidget(
BuildContext context) → PreferredSizeWidget? -
Available on StacWidget?, provided by the StacWidgetParser extension
Parses a widget for a slot that needs a PreferredSizeWidget, such as a scaffold'sappBaror an app bar'sbottom. -
toJson(
) → Map< String, dynamic> -
Converts this StacRefreshIndicator to JSON.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited