Skip to content

Commit d4bee8b

Browse files
authored
Merge pull request #171 from GetStream/sample_general_updates2
2 parents e4947b3 + a306e5b commit d4bee8b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/stream_feed_flutter_core/lib/src/flat_feed_core.dart

Lines changed: 7 additions & 1 deletion
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>();
@@ -110,8 +113,11 @@ class _GenericFlatFeedCoreState<A, Ob, T, Or>
110113
if (activities.isEmpty) {
111114
return widget.onEmptyWidget;
112115
}
113-
return ListView.builder(
116+
return ListView.separated(
117+
physics:
118+
widget.scrollPhysics ?? const AlwaysScrollableScrollPhysics(),
114119
itemCount: activities.length,
120+
separatorBuilder: (context, index) => const Divider(),
115121
itemBuilder: (context, idx) => widget.feedBuilder(
116122
context,
117123
activities,

0 commit comments

Comments
 (0)