Skip to content

Commit 8f2e877

Browse files
Added scrollDirection to the PagedList constructor
1 parent b85e6d3 commit 8f2e877

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

packages/wisewidgetslibrary/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.1.3
2+
3+
* Added scrollDirection to the PagedList constructor
4+
15
## 2.1.2
26

37
* Added invisibleItemsThreshold to the PagedList constructor

packages/wisewidgetslibrary/lib/src/widgets/paged_list.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class PagedList<T> extends StatelessWidget {
2525
this.shimmerColor,
2626
this.shimmerHighlightColor,
2727
this.invisibleItemsThreshold = 5,
28+
this.scrollDirection = Axis.horizontal,
2829
});
2930

3031
/// List of items to display, usually a stream from database
@@ -76,11 +77,16 @@ class PagedList<T> extends StatelessWidget {
7677
/// The threshold for the number of invisible items to trigger fetching more data.
7778
final int invisibleItemsThreshold;
7879

80+
/// The [Axis] along which the scroll view's offset increases.
81+
/// Defaults to [Axis.vertical].
82+
final Axis scrollDirection;
83+
7984
@override
8085
Widget build(BuildContext context) {
8186
return ValueListenableBuilder(
8287
valueListenable: controller.isLoading,
8388
builder: (context, isLoading, child) => InfiniteListView.separated(
89+
scrollDirection: scrollDirection,
8490
shrinkWrap: shrinkWrap,
8591
physics: physics,
8692
padding: padding,

packages/wisewidgetslibrary/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: wisewidgetslibrary
22
description: Wisemen widgets library containing platform specific widgets and other commonly useful widgets.
3-
version: 2.1.2
3+
version: 2.1.3
44
homepage: https://github.com/wisemen-digital/wisemen-flutter-packages/packages/wisewidgetslibrary
55
repository: https://github.com/wisemen-digital/flutter-widgets-library/packages/wisewidgetslibrary
66

0 commit comments

Comments
 (0)