MyGit

BytesZero/loadany

Fork: 8 Star: 26 (更新于 1970-01-01 00:00:00)

license: Apache-2.0

Language: Dart .

Flutter load more package , support ListView、GridView、Slivers

最后发布版本: 1.0.0 ( 2021-03-05 16:10:13)

官方网址 GitHub网址

LoadAny

A new Flutter loads more package.

Website

中文说明

Codemagic build status

Support

  • CustomScrollView
  • SliverListView
  • SliverGridView
  • SliverListView substitute ListView
  • SliverGridView substitute GridView
  • Custom loading style
  • External nested RefreshIndicator
  • Feed streaming

Usage

  • Add LoadAny
import 'package:loadany/loadany.dart';
LoadStatus status = LoadStatus.normal;

LoadAny(
  onLoadMore: getLoadMore,
  status: status,
  footerHeight: 40,
  endLoadMore: true,
  bottomTriggerDistance: 200,
  child: CustomScrollView(
    slivers: <Widget>[
      SliverGrid(...),
      SliverList(...),
    ],
  ),
)
/// Load More Get Data
Future<void> getLoadMore() async {
    setState(() {
      status = LoadStatus.loading;
    });
    Timer.periodic(Duration(milliseconds: 5000), (Timer timer) {
      timer.cancel();
      int length = list.length;
      for (var i = 1; i < 11; ++i) {
        list.add(length + i);
      }
    
      if (length > 80) {
        status = LoadStatus.completed;
      } else if (length >= 50 && length < 70) {
        status = LoadStatus.error;
      } else {
        status = LoadStatus.normal;
      }
      setState(() {});
    });
}

Getting Started

Getting Started

Screenshot

  • Loading
  • Error
  • Completed

Issues and feedback

Please file issues to send feedback or report a bug. Thank you!

关注我

  • 遇到问题可以找我帮助解决(联系方式在 GitHub 主页)
  • 持续分享优质的 Flutter 文章和视频
  • 不定期分享 Flutter 开发小技巧
  • 百万级 Flutter 应用架构经验

github juejin csdn

最近版本更新:(数据更新于 1970-01-01 00:00:00)

2021-03-05 16:10:13 1.0.0

2020-06-11 18:20:05 0.1.4

2020-04-04 23:09:37 0.1.3

2019-08-27 15:28:25 0.1.2

2019-08-09 23:13:41 0.1.1

2019-07-25 16:05:11 0.1.0

主题(topics):

fluter-loadmore, flutter, flutter-package, loadany

BytesZero/loadany同语言 Dart最近更新仓库

2024-10-04 07:09:37 hiddify/hiddify-next

2024-09-26 14:40:26 chen08209/FlClash

2024-09-25 12:39:02 felangel/data_class

2024-09-19 11:57:29 wgh136/PicaComic

2024-09-06 22:53:07 ReVanced/revanced-manager

2024-08-28 05:03:06 google-gemini/generative-ai-dart