Skip to content

Commit

Permalink
Fix: Added Community Roles in posts (#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
umareko authored May 30, 2024
1 parent 14d10a1 commit be39618
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions devtools_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extensions:
11 changes: 11 additions & 0 deletions lib/core/widget/feed_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class FeedWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
final themeData = Theme.of(context);


return StreamBuilder<AmityPost>(
stream: amityPost.listen.stream,
Expand Down Expand Up @@ -147,10 +148,20 @@ class FeedWidget extends StatelessWidget {
style: themeData.textTheme.bodySmall,
),
if (value.target is CommunityTarget)

Text(
'Posted On : ${(value.target as CommunityTarget).targetCommunity?.displayName ?? 'No name'} Community',
style: themeData.textTheme.bodySmall,
),

(value.target as CommunityTarget).postedCommunityMember!=null?

Text(
'Poster Roles On : ${(value.target as CommunityTarget).postedCommunityMember?.roles ?? 'No Roles'} in Community',
style: themeData.textTheme.bodySmall,
): const SizedBox() ,


Text(
"LatestCommentUserName -> ${snapshot.data!.latestComments?[0].user?.displayName ?? "No Latest comment user"}",
style: themeData.textTheme.bodySmall,
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_social_sample_app
description: Demonstrates how to use the flutter_application_1 plugin.
version: 1.1.43+58
version: 1.1.44+59


environment:
Expand Down

0 comments on commit be39618

Please sign in to comment.