Releases: gonuit/flutter-custom-refresh-indicator
Releases · gonuit/flutter-custom-refresh-indicator
v1.1.2
v1.1.0
Changes
Fixes:
- Handle errors thrown from the
onRefreshmethod.
Improvements:
- Updated example app
- Added support for the Android embedding v2
- Added web support
- Added windows support.
- Added a web-based demo app (URL in the readme file).
- Replaced the deprecated
disallowGlowmethod calls withdisallowIndicator. - Added
onStateChangedfunction argument that allows tracking indicator state changes. - The
IndicatorStateHelperclass is now deprecated in favor ofonStateChangefunction andIndicatorStateChangeclass. - Initial support for programmatically-controlled indicators has been added. Added the
show,hideandrefreshmethods to theCustomRefreshIndicatorStateclass. It can be accessed via GlobalKey. Take a look at an programmatically-controlled screen example. - Use the
flutter_lintspackage for analysis. - Deprecate
leadingGlowVisibleandtrailingGlowVisiblein favor ofleadingScrollIndicatorVisibleandtrailingScrollIndicatorVisiblearguments. - Added
reversedargument that allows you to trigger a refresh indicator from the end of the list. - Added
envelopeexample. - Added
pull to fetch moreexample.
v1.1.0-dev.3
Changes:
Fixes:
- Handle errors thrown from the
onRefreshmethod.
Improvements:
- Updated example app
- Added support for the Android embedding v2
- Added web support
- Added windows support.
- Added a web-based demo app (url in the readme file).
- Replaced the deprecated
disallowGlowmethod calls withdisallowIndicator. - Added
onStateChangedfunction argument that allows tracking indicator state changes. - The
IndicatorStateHelperclass is now deprecated in favor ofonStateChangefunction andIndicatorStateChangeclass. - Initial support for programmatically-controlled indicators has been added. Added the
show,hideandrefreshmethods to theCustomRefreshIndicatorStateclass. It can be accessed via GlobalKey. Take a look at an programmatically-controlled screen example. - Use the
flutter_lintspackage for analysis. - Deprecate
leadingGlowVisibleandtrailingGlowVisiblein favor ofleadingScrollIndicatorVisibleandtrailingScrollIndicatorVisiblearguments. - Added
reversedargument that allows you to trigger a refresh indicator from the end of the list. - Added
envelopeexample. - Added
pull to fetch moreexample.
v1.1.0-dev.2
Changes
Fixes:
- Handle errors thrown from the
onRefreshmethod.
Improvements:
- Updated example app
- Added support for the Android embedding v2
- Added web support
- Added windows support.
- Added a web based demo app (url in the readme file).
- Replaced the deprecated
disallowGlowmethod calls withdisallowIndicator. - Added
onStateChangedfunction argument that allows tracking indicator state changes. - The
IndicatorStateHelperclass is now deprecated in favor ofonStateChangefunction andIndicatorStateChangeclass. - Initial support for programmatically-controlled indicators has been added. Added the
show,hideandrefreshmethods to theCustomRefreshIndicatorStateclass. It can be accessed via GlobalKey. Take a look at an programmatically-controlled screen example. - Use the
flutter_lintspackage for analysis. - Deprecate
leadingGlowVisibleandtrailingGlowVisiblein favor ofleadingScrollIndicatorVisibleandtrailingScrollIndicatorVisiblearguments. - Added
reversedargument that allows you to trigger a refresh indicator from the end of the list. - Added
envelopeexample. - Added
pull to fetch moreexample.
v1.1.0-dev.1
Changes:
- Fixes:
- Handle errors thrown from the
onRefreshmethod.
- Handle errors thrown from the
- Improvements:
- Updated example app
- Added support for the Android embedding v2
- Added web support
- Added windows support.
- Added a web-based demo app (URL in the readme file).
- Replaced the deprecated
disallowGlowmethod calls withdisallowIndicator. - Added
onStateChangedfunction argument that allows tracking indicator state changes. - The
IndicatorStateHelperclass is now deprecated in favor ofonStateChangefunction andIndicatorStateChangeclass. - Initial support for programmatically-controlled indicators has been added. Added the
show,hideandrefreshmethods to theCustomRefreshIndicatorStateclass. It can be accessed via GlobalKey. Take a look at an programmatically-controlled screen example. - Use the
flutter_lintspackage for analysis. - Deprecate
leadingGlowVisibleandtrailingGlowVisiblein favor ofleadingScrollIndicatorVisibleandtrailingScrollIndicatorVisiblearguments.
- Updated example app
v1.0.0
- Stable nullsafety release.
- BREAKING: opt into null safety
- Dart SDK constraints: >=2.12.0-0 <3.0.0
- BREAKING: Removed
prevStatefromIndicatorControllerclass.
Because flutter only marks the widget that it is ready for rebuild, it is possible that the controller state will change more than once during a single frame what causes one or more steps to be skipped. To still useprevStateanddidChangeStatemethod, you can useIndicatorStateHelper. Take a look atcheck_mark_indicator.dartorwarp_indicator.dartfor example usage. - Added
IndicatorStateHelperclass. - Added
IndicatorControllerunit tests. - Added warp indicator example.
- Added
stopDragmethod to theIndicatorControllerclass. It allows you to stop current user drag.
v1.0.0-nullsafety.1
Changes:
- Stable nullsafety release.
- BREAKING: Removed
prevStatefromIndicatorControllerclass.
Because flutter only marks the widget that it is ready for rebuild, it is possible that the controller state will change more than once during a single frame what causes one or more steps to be skipped. To still useprevStateanddidChangeStatemethod, you can useIndicatorStateHelper. Take a look atcheck_mark_indicator.dartorwarp_indicator.dartfor example usage. - Added
IndicatorStateHelperclass. - Added
IndicatorControllerunit tests. - Added warp indicator example.
v1.0.0-nullsafety.0
Changes
- opt into null safety
- set Dart SDK constraints to: >=2.12.0-0 <3.0.0
- removed emoji indicator from the example app
v0.9.0
Changes:
- Improved readme documentation.
- Removed material package import.
- Added
isCompleteandwasCompletecontroller getters. - Removed
axisproperty as it can be handled bynotificationPredicate. - Added optional
completeindicator state together withcompleteStateDurationparameter. IndicatorControlerchanges:- Added
prevoiusStateproperty. - Added
didStateChangehelper method. - Added
wasArmed,wasDragging,wasLoading,wasHidingandwasIdleproperties.
- Added
- Added
notificationPredicateproperty to theCustomRefreshIndicatorwidget. - Example app:
- Added initial version of
check_mark_indicator. Example that shows how to make use ofcompletestate.
- Added initial version of
CustomRefreshIndicator widget controller
BREAKING API CHANGES
- Feedback improvements (thank you for your emails!):
- Changed long identifier names:
CustomRefreshIndicatorData=>IndicatorControllerCustomRefreshIndicatorState=>IndicatorState
- Changed long identifier names:
- Update example app
-
indicatorBuilderargument is no longer present. Instead usebuilderargument which has some significant changes.
To animate indicator based on IndicatorControler you can use AnimationBuilder widget and pass IndicatorData object as animation argument. Because of that you can implement your own widget rebuild system what can improve your custom indicator performance (instead of building indicator eg. 300 times you can decide when you want to do it). Example:
return CustomRefreshIndicator(
child: ListView(children: <Widget>[/* ... */]),
builder: (
BuildContext context,
/// Subtree that contains scrollable widget and was passed
/// to child argument
Widget child,
/// Now all your data will be stored in controller.
/// To get controller outside of this function
/// 1. Create controller in parent widget and pass it to CustomRefreshIndicator
/// 2. Assign [GlobalKey] to CustomRefreshIndicator and access `key.currentState.controller`.
IndicatorController controller
) {
return AnimatedBuilder(
// IndicatorData extends ChangeNotifier class so it is possible to
// assign it to an AnimationBuilder widget and take advantage of subtree rebuild
animation: controller,
child: MyPrebuildWidget(),
child: child,
builder: (BuildContext context, Widget child) {
/// TODO: Implement your custom refresh indicator
},
);
},
onRefresh: myAsyncMethod,
);