SwipeRefresh는 스크롤 가능한 목록 및 기타 콘텐츠에서 아래로 스와이프하여 새로 고침 기능을 활성화할 수 있도록 도와주는 Flutter 패키지입니다. 동적 데이터(피드나 목록 등)를 가진 앱에서 흔히 사용되는 자연스러운 제스처를 통해 콘텐츠를 새로 고칠 수 있어 사용자 경험을 향상시킵니다. 이 패키지는 Android, iOS, Web, macOS, Windows, Linux 등 여러 플랫폼을 지원하며 장치 간 일관된 동작을 보장합니다. 기존 스크롤 뷰와 원활하게 통합되며 사용자 정의 가능한 인디케이터와 리프레시 트리거를 제공합니다.
사용 사례
목록 데이터 새로 고침
피드 콘텐츠 업데이트
끌어올릴 때 새 항목을 로드 중
스크롤 가능한 뷰에서 UX 향상
다시로드를 위한 풀링을 대시보드에 구현하기
주요 기능
드래그 다운 제스처 지원
사용자 정의 가능한 새로 고침 표시기
크로스 플랫폼 호환성
ScrollView와의 간편한 통합
사용자 정의 가능한 새로 고침 트리거 시점
새로 고치는 동안 부드러운 애니메이션
적합한 대상
동적 목록을 구축하는 개발자
실시간 데이터 업데이트가 필요한 앱
사용자 경험 중심의 모바일 및 웹 애플리케이션
다중 플랫폼 간에 일관된 새로 고침 패턴이 필요한 프로젝트
직관적인 사용자 상호작용을 우선시하는 팀
고려 사항
추가 상태 관리가 필요할 수 있습니다
강한 갱신 로직으로 인한 성능 영향
복잡한 새로 고침 애니메이션에 대한 사용자 정의 기능이 제한적
스크롤되지 않는 콘텐츠에 적합하지 않음
스크롤 가능한 컨테이너 내에서 올바르게 사용되는 것에 의존
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
Swipe Refresh
Overview
Widget for refresh by swipe.
:1234: Enabled on every platform - the package is fully written on Flutter side and enabled on every platform.
:recycle: Fully covered by tests - guaranteeing the result and expectations from this package.
:notebook_with_decorative_cover: End-to-end documentation - every aspect of implementation is documented, so there is full understanding.
:cow2: Support from the best Flutter experts - we are open to any enhancement ideas and contributions.
Refresh indicator widget with Material Design style.
SwipeRefresh.material(
stateStream: Stream<SwipeRefreshState>(),
onRefresh: _refresh,
padding: constEdgeInsets.symmetric(vertical: 10),
children: <Widget>[ ... ],
);
Future<void> _refresh() async {
// When all needed is done change state.
_controller.sink.add(SwipeRefreshState.hidden);
}
Cupertino
Refresh indicator widget with Cupertino Design style.
SwipeRefresh.cupertino(
stateStream: Stream<SwipeRefreshState>(),
onRefresh: _refresh,
padding: constEdgeInsets.symmetric(vertical: 10),
children: <Widget>[ ... ],
);
Future<void> _refresh() async {
// When all needed is done change state.
_controller.sink.add(SwipeRefreshState.hidden);
}
Adaptive
Refresh indicator widget with adaptive to platform style.
SwipeRefresh.adaptive(
stateStream: Stream<SwipeRefreshState>(),
onRefresh: _refresh,
padding: constEdgeInsets.symmetric(vertical: 10),
children: <Widget>[ ... ],
);
Future<void> _refresh() async {
// When all needed is done change state.
_controller.sink.add(SwipeRefreshState.hidden);
}
Builder
Refresh indicator widget with adaptive to platform style, and with SliverChildBuilderDelegate in childDelegate(so as not to create more child elements than are visible through Viewport).
At this moment, the current version of swipe_refresh is .
Changelog
All notable changes to this project will be documented in this file.
Issues
To report your issues, submit them directly in the Issues section.
Contribute
If you would like to contribute to the package (e.g. by improving the documentation, fixing a bug or adding a cool new feature), please read our contribution guide first and send us your pull request.
Your PRs are always welcome.
How to reach us
Please feel free to ask any questions about this package. Join our community chat on Telegram. We speak English and Russian.