Skip to content

Commit c35c998

Browse files
committed
add some code snipets
1 parent dda3ea8 commit c35c998

File tree

1 file changed

+26
-6
lines changed

1 file changed

+26
-6
lines changed

packages/stream_feed_flutter_core/lib/src/bloc/feed_bloc.dart

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,40 @@ import 'package:stream_feed_flutter_core/src/extensions.dart';
1010
///
1111
/// [GenericFeedBloc] can be access at anytime by using the factory [of] method
1212
/// using Flutter's [BuildContext].
13-
///
14-
/// Usually what you want is the convenient [FeedBloc] that already
13+
///
14+
/// Usually what you want is the convenient [FeedBloc] that already
1515
/// has the default parameters defined for you
1616
/// suitable to most use cases
17-
///
17+
///
1818
/// ## Usage
19-
/// - query activities
20-
/// - query reactions (like, retweet, claps)
21-
/// - add activities (a tweet for example)
19+
/// - query the activities stream. Checkout our core widget [FlatFeedCore]
20+
/// to display activities
21+
/// - query the reactions stream (like, retweet, claps). Checkout our core widget [ReactionListCore]
22+
/// to display reactions
23+
/// - add activities (a tweet for example) in a reactive way
24+
/// ```dart
25+
/// FeedProvider.of(context).bloc.onAddActivity()
26+
/// ```
2227
/// - remove activities (delete a tweet)
28+
/// ```dart
29+
/// FeedProvider.of(context).bloc.onRemoveActivity()
30+
/// ```
2331
/// - add reactions (comment under a tweet)
32+
/// ```dart
33+
/// FeedProvider.of(context).bloc.onAddReaction()
34+
/// ```
2435
/// - remove reacitons (delete a comment under a tweet)
36+
/// ```dart
37+
/// FeedProvider.of(context).bloc.onRemoveReaction()
38+
/// ```
2539
/// - add child reactions (like to a comment)
40+
/// ```dart
41+
/// FeedProvider.of(context).bloc.onAddReaction()
42+
/// ```
2643
/// - remove child reacitons (unlike a comment)
44+
/// ```dart
45+
/// FeedProvider.of(context).bloc.onRemoveChildReaction()
46+
/// ```
2747
2848
class GenericFeedBloc<A, Ob, T, Or> {
2949
GenericFeedBloc({required this.client, this.analyticsClient});

0 commit comments

Comments
 (0)