패키지, 저장소 및 앱 카테고리 검색

패키지 상세v4.0.0

easy_refresh

푸르다운 리프레시와 푸르업 로드를 제공하는 플러터 위젯입니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
4.7만
좋아요
573
Pub 점수
150

패키지 설치

flutter pub add easy_refresh

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

EasyRefresh는 리스트 및 스크롤 가능한 위젯에서 풀다운 리프레시 및 풀다운 더 로드 기능을 간편하게 구현할 수 있도록 도와주는 Flutter 패키지입니다. 최소한의 설정으로 부드럽고 사용자 정의 가능한 새로 고침 및 로딩 인디케이터를 제공하며, Android, iOS, Web, macOS, Windows, Linux 등 모든 주요 플랫폼을 지원합니다. 데이터 로딩 및 새로 고침 작업 중에 반응성 있는 피드백을 제공하여 사용자 경험을 향상시킵니다. ListView, GridView 및 기타 스크롤 가능한 컴포넌트와 원활하게 통합되어 피드나 채팅 인터페이스와 같은 동적 콘텐츠 표시에 이상적입니다.

사용 사례

  • 리스트 뷰에서 풀다운 리프레시 구현하기
  • 풀업 로딩과 무한 스크롤 추가
  • 반응형 데이터 피드 생성
  • 채팅 또는 뉴스 앱 인터페이스 구축
  • 스크롤 가능한 콘텐츠의 사용자 경험 향상
  • 동기화 표시기를 갖춘 오프라인 우선 앱 지원

주요 기능

  • 사용자 지정 인디케이터를 사용한 풀다운 새로 고침
  • 설정 가능한 임계값을 가진 상단으로 당겨서 더 불러오기
  • 크로스 플랫폼 호환성
  • 사용자 정의 애니메이션 및 스타일링
  • 내장된 로딩 상태 및 콜백
  • ScrollView와의 간단한 통합

적합한 대상

  • 리스트 중심 앱을 개발하는 개발자
  • 부드러운 UX를 우선시하는 팀
  • 무한 스크롤이 필요한 프로젝트
  • 실시간 데이터 업데이트가 가능한 앱
  • 빠른 구현을 원하는 프론트엔드 개발자

고려 사항

  • 추가 상태 관리가 필요할 수 있습니다
  • 사용자 정의 옵션은 복잡성을 증가시킬 수 있습니다
  • 최적화되지 않은 경우 대규모 데이터 세트로 인한 성능 영향
  • 복잡한 중첩 스크롤에 대한 내장 지원이 제한적입니다
  • 비동기 데이터 소스의 적절한 처리에 의존

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

flutter_easy_refresh

License Platform Flutter Pub

English | 中文

Just like the name, EasyRefresh can easily implement pull-down refresh and pull-up load on Flutter applications. It supports almost all Flutter Scrollable widgets. Its function is very similar to Android's SmartRefreshLayout, and it also absorbs the advantages of many third-party libraries. EasyRefresh integrates various styles of Header and Footer, but it has no limitations, you can easily customize it. Using Flutter's powerful animations, even just a simple control can be done. The goal of EasyRefresh is to create a powerful, stable and mature pull-to-refresh framework for Flutter.

Online demo
APK download
API reference

Features:

  • Supports all scrollable widgets
  • Scrolling physics scope, exactly matching scrollable widgets
  • Integrate multiple cool Header and Footer
  • Support custom styles to achieve various animation effects
  • Support pull-down refresh, pull-up load (Can be triggered and finished with a controller)
  • Support indicator position setting, combined with listeners can also be placed in any position
  • Support refresh when the page starts, and customize the view
  • Support safe area, no more occlusion
  • Customize scroll parameters to allow lists to have different scrolling feedback and inertia

Companion Packages

For pagination helpers, use the standalone easy_paging Pub package.

import 'package:easy_paging/easy_paging.dart';
import 'package:easy_refresh/easy_refresh.dart';

Sample implementation: example/lib/page/sample/paging_page.dart

Sample

1. Default constructor
  • In the child scope, all scrolling components will share one physics. If there is scroll nesting, use EasyRefresh.builder or set the scope with ScrollConfiguration
  EasyRefresh(
    onRefresh: () async {
      ....
    },
    onLoad: () async {
      ....
    },
    child: ListView(),
  );
2. Builder constructor
  EasyRefresh.builder(
    onRefresh: () async {
      ....
      return IndicatorResult.success;
    },
    onLoad: () async {
      ....
    },
    childBuilder: (context, physics) {
      return ListView(
        physics: physics,
      );
    },
  );
3. Indicator locate
  EasyRefresh(
    header: Header(
      position: IndicatorPosition.locator,
    ),
    footer: Footer(
      position: IndicatorPosition.locator,
    ),
    onRefresh: () async {
      ....
    },
    onLoad: () async {
      ....
      return IndicatorResult.noMore;
    },
    child: CustomScrollView(
      slivers: [
        SliverAppBar(),
        const HeaderLocator.sliver(),
        ...
        const FooterLocator.sliver(),
      ],
    ),
  );
4. Use controller
  EasyRefreshController _controller = EasyRefreshController(
    controlFinishRefresh: true,
    controlFinishLoad: true,
  );
  ....
  EasyRefresh(
    controller: _controller,
    onRefresh: () async {
      ....
      _controller.finishRefresh();
      _controller.resetFooter();
    },
    onLoad: () async {
      ....
      _controller.finishLoad(IndicatorResult.noMore);
    },
    ....
  );
  ....
  _controller.callRefresh();
  _controller.callLoad();
5. Specify Header and Footer
  EasyRefresh(
    header: MaterialHeader(),
    footer: MaterialFooter(),
    child: ListView(),
    ....
  );
  // Global
  EasyRefresh.defaultHeaderBuilder = () => ClassicHeader();
  EasyRefresh.defaultFooterBuilder = () => ClassicFooter();
6. NestedScrollView
  EasyRefresh.builder(
    header: MaterialHeader(
      clamping: true,
    ),
    onRefresh: () async {
      ....
    },
    onLoad: () async {
      ....
    },
    childBuilder: (context, physics) {
      return NestedScrollView(
        physics: physics,
        body: ListView(
          physics: physics,
        );
      );
    },
  );
  // or
  EasyRefresh.builder(
    header: MaterialHeader(
      clamping: true,
      position: IndicatorPosition.locator,
    ),
    onRefresh: () async {
      ....
    },
    onLoad: () async {
      ....
    },
    childBuilder: (context, physics) {
      return NestedScrollView(
        physics: physics,
        headerSliverBuilder: (context, innerBoxIsScrolled) {
          return [
            const HeaderLocator.sliver(clearExtent: false),
            ....
          ];
        },
        body: ListView(
          physics: physics,
        );
      );
    },
  );

Style Packages

Package Pub
easy_refresh_bubbles Pub
easy_refresh_bow Pub
easy_refresh_halloween Pub
easy_refresh_skating Pub
easy_refresh_space Pub
easy_refresh_squats Pub

Feel free to contribute

One's maintenance is lonely. If you have good suggestions and changes, feel free to contribute your code. If you have really cool styles, It's even cooler to share with everyone.

Thanks to all the people who already contributed!

QQ Group - 554981921

Into the group of instructions

The group is not only solve the problem of EasyRefresh, any Flutter related issues can be discussed. Just as its name, craigslist, as long as there is time, group of Lord will help you solve problems together.

Thanks

SmartRefreshLayout
flutter_spinkit

Licenses


MIT License

Copyright (c) 2018 xuelongqy

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


카테고리

의존성

의존성 목록 3 개

소스 저장소

이 패키지를 사용하는 프로젝트