Skip to content

Commit 4a0e8c6

Browse files
committed
feat(core): allow the scroll physics in FlatFeedCore to be set
1 parent e4947b3 commit 4a0e8c6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/stream_feed_flutter_core/lib/src/flat_feed_core.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class GenericFlatFeedCore<A, Ob, T, Or> extends StatefulWidget {
2828
this.flags,
2929
this.ranking,
3030
this.userId,
31+
this.scrollPhysics,
3132
}) : super(key: key);
3233

3334
/// A builder that let you build a ListView of EnrichedActivity based Widgets
@@ -66,6 +67,8 @@ class GenericFlatFeedCore<A, Ob, T, Or> extends StatefulWidget {
6667
/// The feed group to use for the request
6768
final String feedGroup;
6869

70+
final ScrollPhysics? scrollPhysics;
71+
6972
@override
7073
_GenericFlatFeedCoreState<A, Ob, T, Or> createState() =>
7174
_GenericFlatFeedCoreState<A, Ob, T, Or>();
@@ -111,6 +114,8 @@ class _GenericFlatFeedCoreState<A, Ob, T, Or>
111114
return widget.onEmptyWidget;
112115
}
113116
return ListView.builder(
117+
physics:
118+
widget.scrollPhysics ?? const AlwaysScrollableScrollPhysics(),
114119
itemCount: activities.length,
115120
itemBuilder: (context, idx) => widget.feedBuilder(
116121
context,

0 commit comments

Comments
 (0)