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)
LoadAny
A new Flutter loads more package.
Website
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
Screenshot
- Loading
- Error
- Completed
Issues and feedback
Please file issues to send feedback or report a bug. Thank you!
关注我
- 遇到问题可以找我帮助解决(联系方式在
GitHub
主页) - 持续分享优质的
Flutter
文章和视频 - 不定期分享
Flutter
开发小技巧 - 百万级
Flutter
应用架构经验
最近版本更新:(数据更新于 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-11-05 11:39:34 KaringX/karing
2024-11-05 08:14:52 localsend/localsend
2024-11-02 14:13:41 3003h/Eros-FE
2024-10-26 17:04:11 chen08209/FlClash
2024-10-22 11:36:07 AppFlowy-IO/AppFlowy
2024-10-10 23:24:57 guozhigq/pilipala