搜尋套件、儲存庫與 APP 分類

list_load_more 封面
套件詳情v1.0.1

list_load_more

一個容易實現的懶加載 ListView,容易自訂您自己的載入動畫,並支援新增、刪除單一項目以及聚焦到項目等功能。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
13
喜歡數
57
Pub 分數
140

安裝套件

flutter pub add list_load_more

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

ListLoadMore 是一個 Flutter 套件,可簡化 ListView 中的懶加載實作,透過最少的設定即可實現無縫分頁。它支援自訂載入動畫,並提供新增或移除單一項目以及聚焦特定清單項目等功能。設計上強調易用性與高度客製化,可在 Android、iOS、Web、macOS、Windows 與 Linux 等所有主要平台運作。適合需要動態內容載入卻不犧牲效能或使用者體驗的應用。

適用情境

  • 無限捲動資訊流
  • 動態資料列表
  • 可自定義的載入指示器
  • 即時資料更新
  • 使用者驅動的項目管理
  • 流暢的滾動體驗

主要特色

  • 與 ListView 的輕鬆整合
  • 可自訂的載入動畫
  • 支援項目新增/刪除
  • 聚焦控制特定項目
  • 跨平台相容性
  • 最少的樣板程式碼

適合對象

  • 開發分頁列表的開發者
  • 動態內容的應用程式
  • 需要順暢加載的UI密集型應用
  • 重視快速開發的團隊
  • 需要可自定義加載狀態的專案
  • 跨平台 Flutter 應用

使用建議

  • 需要手動處理資料來源邏輯
  • 有限的內建錯誤處理
  • 自訂動畫若未經過優化,可能會影響效能
  • 對於非常大的資料集,若無額外優化則不理想
  • 依賴外部狀態管理來處理複雜場景

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

A beautiful ListLoadMore easy to use and customize.

List Load More

DEMO

Usage

Simple implementation:
        final GlobalKey<ListLoadMoreState> _key = GlobalKey();
        ListLoadMore<Employee>(
            key: _key
            status: ListLoadMoreStatus.none,
            total: totalItem,
            itemBuilder: (item, index) => _employeeWidget(item),
            onLoadMore: (int currentTotal) async {
              // call your API load more here with currentTotal is total item we have
            },
            onRefresh: () async {
              // call API refresh here
            },
        )
Then you can add your new items to ListLoadMore:
       _key.currentState?.addData(yourNewItemList);
Or you can add single, remove single item:
       _key.currentState?.addItem(item: yourItem, index: 0);
       _key.currentState?.removeItem(index: 0);
You can focus to specific index:
       _key.currentState?.focusToIndex(index);

License

Copyright (c) 2021 Tuannvm

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.

所屬分類

依賴

依賴清單 2 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。