antd_refresh 1.0.2
antd_refresh: ^1.0.2 copied to clipboard
Ant Design pull-to-refresh for Flutter - indicator states, drag thresholds and smooth scroll integration.
Changelog #
1.0.2 #
- Republished with a Web-compatible dependency chain.
- Republished to refresh pub.dev platform scoring.
1.0.1 #
- Fix pub.dev static analysis results by aligning internal dependency constraints.
- Ship the package example and tighten pubspec metadata for better pub.dev scoring.
- Documentation and changelog polish.
1.0.0 #
Initial stable release of the standalone antd_refresh package.
Features #
AntPullToRefreshpull-to-refresh aligned with antd-mobile v5 PullToRefresh, driven by the scroll view passed aschild.- Top and bottom pull edges through
pointer. - Touch gestures via overscroll notifications, working with both bouncing and clamping platform physics.
- Desktop and web refresh driven by accumulated mouse-wheel overscroll at the pull edge, with a 400 ms settle before triggering.
- Wheel handling that only claims events when the pointer is inside the component and the inner scroll is at the edge, keeping nested and sibling scrollables independent.
AlwaysScrollableScrollPhysicsadded on top of platform physics so short and empty lists can still be pulled.- Five refresh states (
AntPullToRefreshStatus.idle/pulling/canRelease/refreshing/complete) withpullStatusChange. - Configurable
headHeight,threshold,enableRefreshand a fully customheaderwidget. AntInfiniteScrollload-more at the scroll end with aFuture<bool>callback, wherefalsemarks the end of the data.- Footer states for loading, failure with tap-to-retry, and no-more, occupying a 48 px slot with matching child bottom padding.
- First-frame check that loads immediately when the content is shorter than the viewport.
AntRefreshControllerhierarchy withisAttached;AntPullToRefreshController.callRefresh(),AntInfiniteScrollController.callLoadMore()andreset(), raisingStateErrorwhen detached.AntRefreshStringswith built-in text for Chinese, English, Japanese, Korean, French, German, Spanish, Russian, Portuguese, Italian and Arabic, pluscopyWithand locale resolution with Chinese fallback.- Explicit text overrides taking precedence over
strings,localeand the system locale. - Theme-aware indicator, footer typography and spacing through
antd_theme.
Notes #
childmust contain a bounded, scrollable widget; the widgets are wrappers and do not build slivers.- Default labels are Chinese; pass
localeorstringsfor other languages. hasMoreTextis accepted for API parity but the footer is not rendered while idle.