custom_refresh_indicator 1.0.0-nullsafety.0
custom_refresh_indicator: ^1.0.0-nullsafety.0 copied to clipboard
Flutter Widget that make it easy to implement custom refresh indicator.
1.0.0-nullsafety.0 #
- BREAKING: opt into null safety
- Dart SDK constraints: >=2.12.0-0 <3.0.0
0.9.0 #
- Improved readme documentation.
- Removed material package import.
0.9.0-dev.2 #
- Added
isCompleteandwasCompletecontroller getters. - Removed
axisproperty as it can be handled bynotificationPredicate.
0.9.0-dev.1 #
- 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
0.8.0+1 #
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,
);
0.2.1 #
- Upgrade example to AndroidX
- Improved README
0.2.0 #
- Added support for
BouncingScrollPhysics- ios default sroll physics - Improved readme
0.1.1 #
- Extracted inbox example to
letter_refresh_indicatorpackage
0.1.0 #
- Added basic
CustomRefreshIndicatorwidget withCustomRefreshIndicatorDataclass. - Added
SimpleIndicatorContainerwidget which simulate defaultRefreshIndicatorcontainer - Added examples:
- inbox
- simple
- blur