v0.8.0
Pre-release
Pre-release
stream_feed
0.6.0
Changelog
- new: aggregatedFeed.
getEnrichedActivityDetail
and aggregatedFeed.getPaginatedActivities
- new:
PaginatedActivitiesGroup
model - fix:
setUser
now take the data field ofUser
if provided - enhancement/breaking: make the constructor parameters of
PaginatedReactions
named
stream_feed_flutter_core
0.8.0
Changelog
- bump llc: fix:
setUser
not usinguser.data
on user create. - new:
FeedBloc
andGenericFeedBloc
now havequeryPaginatedEnrichedActivities
,loadMoreEnrichedActivities
, andpaginatedParams
to easily manage pagination.
class _CommentsPageState extends State<CommentsPage> {
bool _isPaginating = false;
Future<void> _loadMore() async {
// Ensure we're not already loading more reactions.
if (!_isPaginating) {
_isPaginating = true;
context.feedBloc
.loadMoreReactions(widget.activity.id!, flags: _flags)
.whenComplete(() {
_isPaginating = false;
});
}
}
...
return ReactionListCore(
reactionsBuilder: (context, reactions) =>
RefreshIndicator(
onRefresh: () {
return context.feedBloc.refreshPaginatedReactions(
widget.activity.id!,
flags: _flags,
);
},
child: ListView.separated(
itemCount: reactions.length,
separatorBuilder: (context, index) => const Divider(),
itemBuilder: (context, index) {
bool shouldLoadMore = reactions.length - 3 == index;
if (shouldLoadMore) {
_loadMore();
}
return ListReactionItem(reaction:reactions[index]);
}
))
);
- changed:
GenericFlatFeedCore
andFlatFeedCore
now callsqueryPaginatedEnrichedActivities
on initial load. - fix/breaking:
onAddChildReaction
commenting on a comment is now reactive but we had to remove theactivity
parameter and replace it withlookupValue
. For example:
FeedProvider.of(context).bloc.onAddChildReaction(
kind: 'comment',
reaction: reaction,
lookupValue: widget.reaction.id!,
data: {"text": "this is a comment on a comment"},
);
- docs: Stream Feed Core documentation and examples updated