EasyRefresh class

Inheritance

Constructors

EasyRefresh.new({Key? key, required Widget? child, EasyRefreshController? controller, Header? header, Footer? footer, FutureOr onRefresh()?, FutureOr onLoad()?, SpringDescription? spring, FrictionFactor? frictionFactor, NotRefreshHeader? notRefreshHeader, NotLoadFooter? notLoadFooter, bool simultaneously = false, bool noMoreRefresh = false, bool noMoreLoad = false, bool resetAfterRefresh = true, bool refreshOnStart = false, BuilderHeader? refreshOnStartHeader, double callRefreshOverOffset = 20, double callLoadOverOffset = 20})
const
EasyRefresh.builder({Key? key, required ERChildBuilder? childBuilder, EasyRefreshController? controller, Header? header, Footer? footer, FutureOr onRefresh()?, FutureOr onLoad()?, SpringDescription? spring, FrictionFactor? frictionFactor, NotRefreshHeader? notRefreshHeader, NotLoadFooter? notLoadFooter, bool simultaneously = false, bool noMoreRefresh = false, bool noMoreLoad = false, bool resetAfterRefresh = true, bool refreshOnStart = false, BuilderHeader? refreshOnStartHeader, double callRefreshOverOffset = 20, double callLoadOverOffset = 20})
const

Properties

callLoadOverOffset double
Offset beyond trigger offset when calling load. Used when EasyRefreshController.callLoad.
final
callRefreshOverOffset double
Offset beyond trigger offset when calling refresh. Used when refreshOnStart is true and EasyRefreshController.callRefresh.
final
child Widget?
Try to avoid including multiple ScrollViews. Or set separate ScrollPhysics for other ScrollView. Otherwise use EasyRefresh.builder.
final
childBuilder ERChildBuilder?
EasyRefresh child builder. Provide ScrollPhysics, and use it in your ScrollView. ScrollPhysics will not be scoped.
final
controller EasyRefreshController?
EasyRefresh controller.
final
Footer indicator.
final
frictionFactor FrictionFactor?
Friction factor when list is out of bounds.
final
hashCode int
The hash code for this object.
no setterinherited
Header indicator.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
noMoreLoad bool
Is it loadable after no more.
final
noMoreRefresh bool
Is it possible to refresh after there is no more.
final
notLoadFooter NotLoadFooter?
Overscroll behavior when onLoad is null. Won't build widget.
final
notRefreshHeader NotRefreshHeader?
Overscroll behavior when onRefresh is null. Won't build widget.
final
onLoad FutureOr Function()?
Load callback. Triggered on load. The Footer current state is IndicatorMode.processing. More link IndicatorNotifier.onTask.
final
onRefresh FutureOr Function()?
Refresh callback. Triggered on refresh. The Header current state is IndicatorMode.processing. More link IndicatorNotifier.onTask.
final
refreshOnStart bool
Refresh on start. When the EasyRefresh build is complete, trigger the refresh.
final
refreshOnStartHeader BuilderHeader?
Header for refresh on start. Use header when null.
final
resetAfterRefresh bool
Reset after refresh when no more deactivation is loaded.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
simultaneously bool
Refresh and load can be performed simultaneously.
final
spring SpringDescription?
Structure that describes a spring's constants. When spring is not set in Header and Footer.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _EasyRefreshState
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
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
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 Properties

defaultFooterBuilder Footer Function()
getter/setter pair
defaultHeaderBuilder Header Function()
getter/setter pair

Static Methods

of(BuildContext context) EasyRefreshData