NyPullToRefresh<T> class
NyPullToRefresh is a widget that shows a list of items with a pull to refresh. Example:
NyPullToRefresh(
data: (int iteration) async => [1,2,3,4,5].paginate(itemsPerPage: 2, page: iteration).toList(),
child: (context, data) {
return Text(data.toString());
})
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- NyPullToRefresh
- Available extensions
Constructors
-
NyPullToRefresh({Key? key, dynamic onRefresh()?, dynamic beforeRefresh()?, dynamic afterRefresh(dynamic data)?, required Widget child(BuildContext context, dynamic data), required dynamic data(int iteration), Widget? empty, LoadingStyle? loadingStyle, String? stateName, List<
T> transform(List<T> )?, Axis? scrollDirection, bool? reverse, ScrollController? controller, bool? primary, ScrollPhysics? physics, bool? shrinkWrap, EdgeInsets? padding = EdgeInsets.zero, double? itemExtent, Widget? prototypeItem, ChildIndexGetter? findChildIndexCallback, bool addAutomaticKeepAlives = true, bool addRepaintBoundaries = true, bool addSemanticIndexes = true, double? cacheExtent, int? semanticChildCount, DragStartBehavior? dragStartBehavior, ScrollViewKeyboardDismissBehavior? keyboardDismissBehavior, String? restorationId, String? headerStyle, Clip? clipBehavior, Widget? header, List sort(dynamic items)?}) -
const
-
NyPullToRefresh.grid({Key? key, int? crossAxisCount = 2, double? mainAxisSpacing = 0, double? crossAxisSpacing = 0, dynamic onRefresh()?, dynamic beforeRefresh()?, dynamic afterRefresh(dynamic data)?, required dynamic data(int iteration), List<
T> transform(List<T> )?, required Widget child(BuildContext context, dynamic data), Widget? empty, LoadingStyle? loadingStyle, String? stateName, Axis? scrollDirection, bool? reverse, ScrollController? controller, bool? primary, ScrollPhysics? physics, bool? shrinkWrap, EdgeInsets? padding = EdgeInsets.zero, double? itemExtent, Widget? prototypeItem, ChildIndexGetter? findChildIndexCallback, bool addAutomaticKeepAlives = true, bool addRepaintBoundaries = true, bool addSemanticIndexes = true, double? cacheExtent, int? semanticChildCount, DragStartBehavior? dragStartBehavior, ScrollViewKeyboardDismissBehavior? keyboardDismissBehavior, String? restorationId, String? headerStyle, Clip? clipBehavior, Widget? header, List sort(dynamic items)?}) -
const
-
NyPullToRefresh.separated({Key? key, dynamic onRefresh()?, dynamic beforeRefresh()?, dynamic afterRefresh(dynamic data)?, required dynamic data(int iteration), List<
T> transform(List<T> )?, required Widget child(BuildContext context, dynamic data), required IndexedWidgetBuilder? separatorBuilder, Widget? empty, LoadingStyle? loadingStyle, String? stateName, Axis? scrollDirection, bool? reverse, ScrollController? controller, bool? primary, ScrollPhysics? physics, bool? shrinkWrap, EdgeInsets? padding = EdgeInsets.zero, double? itemExtent, Widget? prototypeItem, ChildIndexGetter? findChildIndexCallback, bool addAutomaticKeepAlives = true, bool addRepaintBoundaries = true, bool addSemanticIndexes = true, double? cacheExtent, int? semanticChildCount, DragStartBehavior? dragStartBehavior, ScrollViewKeyboardDismissBehavior? keyboardDismissBehavior, String? restorationId, String? headerStyle, Clip? clipBehavior, Widget? header, List sort(dynamic items)?}) -
const
Properties
- addAutomaticKeepAlives → bool
-
final
- addRepaintBoundaries → bool
-
final
- addSemanticIndexes → bool
-
final
- afterRefresh → dynamic Function(dynamic data)?
-
final
- beforeRefresh → dynamic Function()?
-
final
- cacheExtent → double?
-
final
- child → Widget Function(BuildContext context, dynamic data)
-
final
- clipBehavior → Clip?
-
final
- controller → ScrollController?
-
final
- crossAxisCount → int?
-
final
- crossAxisSpacing → double?
-
final
- data → dynamic Function(int iteration)
-
final
- dragStartBehavior → DragStartBehavior?
-
final
- empty → Widget?
-
final
- findChildIndexCallback → ChildIndexGetter?
-
final
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- header → Widget?
-
final
- headerStyle → String?
-
final
- itemExtent → double?
-
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- keyboardDismissBehavior → ScrollViewKeyboardDismissBehavior?
-
final
- kind → String
-
final
- loadingStyle → LoadingStyle?
-
final
- mainAxisSpacing → double?
-
final
- onRefresh → dynamic Function()?
-
final
- padding → EdgeInsets?
-
final
- physics → ScrollPhysics?
-
final
- primary → bool?
-
final
- prototypeItem → Widget?
-
final
- restorationId → String?
-
final
- reverse → bool?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollDirection → Axis?
-
final
- semanticChildCount → int?
-
final
- separatorBuilder → IndexedWidgetBuilder?
-
final
- shrinkWrap → bool?
-
final
- sort → List Function(dynamic items)?
-
final
- stateName → String?
-
final
-
transform
→ List<
T> Function(List<T> )? -
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< StatefulWidget> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
faderBottom(
int strength, {Color color = Colors.black}) → NyFader -
Available on StatefulWidget, provided by the NyStateful extension
Make gradient fader from the bottom of the widget. -
faderFrom(
int strength, {Color color = Colors.black, List< AlignmentGeometry> alignment = const [Alignment.topCenter, Alignment.bottomCenter]}) → NyFader -
Available on StatefulWidget, provided by the NyStateful extension
fader from bottom -
faderLeft(
int strength, {Color color = Colors.black}) → NyFader -
Available on StatefulWidget, provided by the NyStateful extension
Make gradient fader from the left of the widget. -
faderRight(
int strength, {Color color = Colors.black}) → NyFader -
Available on StatefulWidget, provided by the NyStateful extension
Make gradient fader from the right of the widget. -
faderTop(
int strength, {Color color = Colors.black}) → NyFader -
Available on StatefulWidget, provided by the NyStateful extension
Make gradient fader from the top of the widget. -
flexible(
{Key? key, int flex = 1, FlexFit fit = FlexFit.loose}) → Flexible -
Available on StatefulWidget, provided by the NyStateful extension
Make a StatefulWidget Flexible. Example: -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toSkeleton(
{Key? key, bool? ignoreContainers, bool? justifyMultiLineText, Color? containersColor, bool ignorePointers = true, bool enabled = true, PaintingEffect? effect, TextBoneBorderRadius? textBoneBorderRadius}) → Skeletonizer -
Available on Widget, provided by the NyWidget extension
Make a widget a skeleton using theSkeletonizer
package. -
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
stateReset(
String stateName) → dynamic - Resets the state