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

패키지 상세v2.0.2

infinite_widgets

무한 레이아웃 위젯을 사용하면 데이터베이스나 네트워크 호출에서 쉽게 무한 목록이나 무한 그리드를 만들 수 있습니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
584
좋아요
19
Pub 점수
140

패키지 설치

flutter pub add infinite_widgets

패키지 개요

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

InfiniteWidgets는 데이터베이스나 네트워크 소스에서 데이터를 단계적으로 로드하는 데 이상적인 무한 스크롤 가능한 목록과 그리드를 쉽게 만들 수 있도록 도와주는 Flutter 패키지입니다. 페이지네이션 로직을 원활하게 처리하는 레이아웃 위젯을 제공하여 반복 코드를 줄여줍니다. 성능을 고려해 설계되어 필요에 따라 항목을 효율적으로 로드하며, 대규모 데이터 세트에 적합합니다. 이 패키지는 Android, iOS, Web, macOS, Windows, Linux 등 모든 주요 플랫폼을 지원합니다.

사용 사례

  • API에서 대규모 데이터셋 로드
  • 무한 스크롤 피드 만들기
  • 지연 로딩을 사용한 동적 그리드 구축
  • 앱에서 페이징된 콘텐츠 구현하기
  • 실시간 데이터 스트림 표시

주요 기능

  • 효율적인 레이지 로딩
  • 무한 목록 및 그리드 지원
  • 내장된 페이지네이션 처리
  • 크로스 플랫폼 호환성
  • 최소한의 보일러플레이트 코드
  • 스무스한 사용자 경험

적합한 대상

  • 대규모 데이터 세트를 포함하는 앱
  • 소셜 미디어 피드
  • 전자상거래 제품 목록
  • 실시간 데이터 표시
  • 간단한 페이지네이션을 찾는 개발자

고려 사항

  • 적절한 상태 관리가 필요합니다
  • 사용자 정의 오류 처리가 필요할 수 있습니다
  • 지속적인 데이터 스트림에 가장 적합
  • 작은 정적 목록에 적합하지 않음
  • 성능은 데이터 소스의 효율성에 따라 달라집니다

원본 README

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

infinite_widgets

Infinite layout widgets like lists, grids...

Infinite list

InfiniteListView has same attributes as a normal flutter ListView widget.

InfiniteListView.separated(
        itemBuilder: (context, index) {
          return Text('$index', style: TextStyle(color: Colors.red, fontWeight: FontWeight.bold));
        },
        itemCount: _data.length, // Current itemCount you have
        hasNext: _data.length < 200, // let the widget know if you have more data to show or not
        nextData: this.loadNextData, // callback called when end to the list is reach and hasNext is true
        separatorBuilder: (context, index) => Divider(height: 1),
      ),
    );

You can specify the last loading row by providing loadingWidget.

You can interact with the trigger to load additional data by default it's 300 but you can override it with scrollThreshold.

Infinite grid

InfiniteGridView has same attributes as a normal flutter GridView widget.

InfiniteGridView(
        gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 4),
        itemBuilder: (context, index) {
          return Text('$index', style: TextStyle(color: Colors.white));
        },
        itemCount: _data.length, // Current itemCount you have
        hasNext: _data.length < 200, // let the widget know if you have more data to show or not
        nextData: this.loadNextData, // callback called when end to the list is reach and hasNext is true
      ),
    );

You can specify the last loading row by providing loadingWidget.

You can interact with the trigger to load additional data by default it's 300 but you can override it with scrollThreshold.

카테고리

소스 저장소

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

아직 데이터가 없습니다.