stream_feed_flutter_core 0.8.0 copy "stream_feed_flutter_core: ^0.8.0" to clipboard
stream_feed_flutter_core: ^0.8.0 copied to clipboard

Stream Feed official Flutter SDK Core. Build your own feed experience using Dart and Flutter.

0.8.0 #

  • bump llc: fix: setUser not using user.data on user create.
  • new: FeedBloc and GenericFeedBloc now have queryPaginatedEnrichedActivities, loadMoreEnrichedActivities, and paginatedParams 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 and FlatFeedCore now calls queryPaginatedEnrichedActivities on initial load.
  • fix/breaking: onAddChildReaction commenting on a comment is now reactive but we had to remove the activity parameter and replace it with lookupValue. 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

0.7.0+1 28/02/2022 #

  • fixes(FeedBloc):
    • bug when adding to a fix lengthed list
    • change the init behavior of queryEnrichedActivities (to allow it to be called again)

0.7.0 25/02/2022 #

  • fix: FeedProvider inherited widget had an issue with the updateShouldNotify being triggered everytime. This has been fixed via the llc, being bumped to 0.5.1.
  • realtime: version bump. You can now listen to connexion status in the Subscription class. For example:
final subscription = await feed.subscribe();
final subscriptionStatus = subscription.stateStream;
  • BREAKING: onAddActivity signature changed. The named parameter datachanged from Map<String, String>? to Map<String, Object>?.
  • BREAKING: Refactors all of our builder methods to return data and not be opinionated about widgets in Core package new: Various additional code documentation added
  • NEW: new model and convenient extensions for the UploadController An Attachment model to convert a MediaUri TO a Map<String, Object?> to send as an extraData along an activity or a reaction. For example:
final bloc = FeedProvider.of(context).bloc;
final uploadController = bloc.uploadController;
final extraData = uploadController.getMediaUris()?.toExtraData();
await bloc.onAddReaction( kind: 'comment', data: extraData, activity: parentActivity, feedGroup: feedGroup );

The attachment model is also useful to convert FROM extraData in an activity or reaction via the toAttachments extension. For example:

final attachments = activity.extraData?.toAttachments()

0.6.0: 12/01/2022 #

  • BREAKING: bumped llc to 0.5.0, which is a breaking change. We no longer accept a token in the constructor. This change is inspired by Stream Chat, and allows for use cases like multi account management. It allows to instantiate StreamFeedClient at the top of your widget tree for example, and connecting the user later.
-  client = StreamFeedClient(apiKey, token: frontendToken);
+  client = StreamFeedClient(apiKey);
+
+  await client.setUser(
+    const User(
+      data: {
+        'name': 'John Doe',
+        'occupation': 'Software Engineer',
+        'gender': 'male'
+      },
+    ),
+    frontendToken,
+  );

0.5.0: 27/12/2021 #

  • fix: the convenient typedefs on generic classes we provided was breaking autocomplete
  • breaking: we renamed some methods
    • followFlatFeed -> followFeed
    • unfollowFlatFeed -> unfollowFeed
    • isFollowingUser -> isFollowingFeed
  • fix: export MediaUri
  • new: add scrollPhysics parameter to ReactionListCore

0.4.1: 22/12/2021 #

  • new: UploadListCore and UploadController

0.4.0+1: 07/12/2021 #

  • Use secure link in readme
  • version bump llc

0.4.0: 29/10/2021 #

  • first release
12
likes
110
pub points
84%
popularity

Publisher

verified publishergetstream.io

Stream Feed official Flutter SDK Core. Build your own feed experience using Dart and Flutter.

Homepage
Repository (GitHub)
View/report issues
Contributing

Documentation

API reference

License

unknown (LICENSE)

Dependencies

dio, equatable, flutter, meta, rxdart, stream_feed

More

Packages that depend on stream_feed_flutter_core