fl_scroll_view

Last updated:

0 purchases

fl_scroll_view Image
fl_scroll_view Images
Add to Cart

Description:

fl scroll view

fl_scroll_view #
Run Web example #
ScrollList.count #
Widget build(BuildContext context) {
return ScrollList.count(
header: const Header(),
footer: const Footer(),
padding: const EdgeInsets.all(10),
maxCrossAxisExtent: 100,
crossAxisCount: 3,
mainAxisSpacing: 10,
crossAxisSpacing: 10,
gridStyle: GridStyle.masonry,
refreshConfig: RefreshConfig(
onRefresh: () async {
debugPrint('onRefresh');
await Future.delayed(const Duration(seconds: 2), () {
RefreshControllers().call(EasyRefreshType.refreshSuccess);
});
}, onLoading: () async {
debugPrint('onLoading');
await Future.delayed(const Duration(seconds: 2), () {
RefreshControllers().call(EasyRefreshType.loadingSuccess);
});
}),
children: []);
}

copied to clipboard
ScrollList.builder #
Widget build(BuildContext context) {
return ScrollList.builder(
header: const Header(),
footer: const Footer(),
maxCrossAxisExtent: 100,
crossAxisCount: 3,
mainAxisSpacing: 10,
crossAxisSpacing: 10,
gridStyle: GridStyle.masonry,
separatorBuilder: (_, int index) => Divider(),
refreshConfig: RefreshConfig(
onRefresh: () async {
debugPrint('onRefresh');
await Future.delayed(const Duration(seconds: 2), () {
RefreshControllers().call(EasyRefreshType.refreshSuccess);
});
}, onLoading: () async {
debugPrint('onLoading');
await Future.delayed(const Duration(seconds: 2), () {
RefreshControllers().call(EasyRefreshType.loadingSuccess);
});
}),
children: []);
}

copied to clipboard
Sliver #
Widget build(BuildContext context) {
return RefreshScrollView(
controller: scrollController,
refreshConfig: RefreshConfig(
onRefresh: () async {
debugPrint('onRefresh');
await Future.delayed(const Duration(seconds: 2), () {
RefreshControllers().call(EasyRefreshType.refreshSuccess);
});
}, onLoading: () async {
debugPrint('onLoading');
await Future.delayed(const Duration(seconds: 2), () {
RefreshControllers().call(EasyRefreshType.loadingSuccess);
});
}),
slivers: [
FlSliverPersistentHeader(
pinned: true,
floating: false,
child: Container(
color: colorList[9],
alignment: Alignment.center,
child: const Text('FlSliverPersistentHeader',
style: TextStyle(color: Colors.black)))),
SliverListGrid.builder(
itemCount: colorList.length,
maxCrossAxisExtent: 100,
crossAxisCount: 3,
mainAxisSpacing: 10,
crossAxisSpacing: 10,
gridStyle: GridStyle.masonry,
separatorBuilder: (_, int index) {
return Text('s$index');
},
itemBuilder: (_, int index) {
return ColorEntry(index, colorList[index]);
}),
SliverListGrid.count(
maxCrossAxisExtent: 100,
crossAxisCount: 3,
mainAxisSpacing: 10,
crossAxisSpacing: 10,
gridStyle: GridStyle.masonry,
children: [
]),
]);
}
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.