v0.8.0
Pre-release
Pre-release
stream_feed
0.6.0
Changelog
- new: aggregatedFeed.
getEnrichedActivityDetailand aggregatedFeed.getPaginatedActivities - new:
PaginatedActivitiesGroupmodel - fix:
setUsernow take the data field ofUserif provided - enhancement/breaking: make the constructor parameters of
PaginatedReactionsnamed
stream_feed_flutter_core
0.8.0
Changelog
- bump llc: fix:
setUsernot usinguser.dataon user create. - new:
FeedBlocandGenericFeedBlocnow havequeryPaginatedEnrichedActivities,loadMoreEnrichedActivities, andpaginatedParamsto 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:
GenericFlatFeedCoreandFlatFeedCorenow callsqueryPaginatedEnrichedActivitieson initial load. - fix/breaking:
onAddChildReactioncommenting on a comment is now reactive but we had to remove theactivityparameter 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