@@ -470,10 +470,11 @@ Future<void> _showCreateCommunityPostDialog(
470470}
471471
472472Future <void > _showRepliesSheet (BuildContext context, String postId) async {
473+ final scheme = Theme .of (context).colorScheme;
473474 await showModalBottomSheet <void >(
474475 context: context,
475476 isScrollControlled: true ,
476- backgroundColor: const Color ( 0xFF0B0B0B ) ,
477+ backgroundColor: scheme.surface ,
477478 builder: (_) => PostRepliesSheet (postId: postId),
478479 );
479480}
@@ -503,6 +504,7 @@ class _FeedPostCard extends StatelessWidget {
503504
504505 @override
505506 Widget build (BuildContext context) {
507+ final scheme = Theme .of (context).colorScheme;
506508 return Card (
507509 child: Padding (
508510 padding: const EdgeInsets .all (14 ),
@@ -527,8 +529,9 @@ class _FeedPostCard extends StatelessWidget {
527529 ),
528530 ),
529531 PopupMenuButton <_PostAction >(
530- icon: const Icon (Icons .more_horiz, color: Colors .white70),
531- color: const Color (0xFF111111 ),
532+ icon: Icon (Icons .more_horiz,
533+ color: scheme.onSurface.withValues (alpha: 0.72 )),
534+ color: scheme.surface,
532535 onSelected: (_PostAction action) {
533536 switch (action) {
534537 case _PostAction .report:
@@ -576,15 +579,15 @@ class _FeedPostCard extends StatelessWidget {
576579 size: 16 ,
577580 color: isLiked
578581 ? const Color (0xFFFF2D55 )
579- : Colors .white70 ,
582+ : scheme.onSurface. withValues (alpha : 0.72 ) ,
580583 ),
581584 const SizedBox (width: 6 ),
582585 Text (
583586 '${post .likeCount }' ,
584587 style: TextStyle (
585588 color: isLiked
586589 ? const Color (0xFFFF2D55 )
587- : Colors .white70 ,
590+ : scheme.onSurface. withValues (alpha : 0.72 ) ,
588591 ),
589592 ),
590593 ],
@@ -605,12 +608,14 @@ class _FeedPostCard extends StatelessWidget {
605608 Icon (
606609 Icons .chat_bubble_outline_rounded,
607610 size: 16 ,
608- color: Colors .white70 ,
611+ color: scheme.onSurface. withValues (alpha : 0.72 ) ,
609612 ),
610613 SizedBox (width: 6 ),
611614 Text (
612615 '${post .replyCount } replies' ,
613- style: TextStyle (color: Colors .white70),
616+ style: TextStyle (
617+ color: scheme.onSurface.withValues (alpha: 0.72 ),
618+ ),
614619 ),
615620 ],
616621 ),
@@ -632,20 +637,24 @@ class _FeedPostCard extends StatelessWidget {
632637 ),
633638 ),
634639 const SizedBox (width: 14 ),
635- const Icon (
640+ Icon (
636641 Icons .visibility_outlined,
637642 size: 16 ,
638- color: Colors .white70 ,
643+ color: scheme.onSurface. withValues (alpha : 0.72 ) ,
639644 ),
640645 const SizedBox (width: 6 ),
641646 Text (
642647 '${post .viewCount }' ,
643- style: const TextStyle (color: Colors .white70),
648+ style: TextStyle (
649+ color: scheme.onSurface.withValues (alpha: 0.72 )),
644650 ),
645651 const Spacer (),
646652 Text (
647653 _compactTime (post.createdAt),
648- style: const TextStyle (color: Colors .white70, fontSize: 12 ),
654+ style: TextStyle (
655+ color: scheme.onSurface.withValues (alpha: 0.72 ),
656+ fontSize: 12 ,
657+ ),
649658 ),
650659 ],
651660 ),
@@ -689,7 +698,11 @@ class _FeedFooter extends StatelessWidget {
689698 child: Text (
690699 message,
691700 textAlign: TextAlign .center,
692- style: const TextStyle (color: Colors .white70),
701+ style: TextStyle (
702+ color: Theme .of (context)
703+ .colorScheme
704+ .onSurface
705+ .withValues (alpha: 0.72 )),
693706 ),
694707 );
695708 }
@@ -718,7 +731,7 @@ class _FeedErrorState extends StatelessWidget {
718731 Text (
719732 message,
720733 textAlign: TextAlign .center,
721- style: const TextStyle (color: Colors .white ),
734+ style: TextStyle (color: Theme . of (context).colorScheme.onSurface ),
722735 ),
723736 const SizedBox (height: 12 ),
724737 ElevatedButton (
@@ -741,17 +754,21 @@ Future<void> _showCommunityInviteDialog(
741754 await showDialog <void >(
742755 context: context,
743756 builder: (BuildContext dialogContext) {
757+ final scheme = Theme .of (dialogContext).colorScheme;
744758 return AlertDialog (
745- backgroundColor: const Color (0xFF111111 ),
746- title: const Text ('Invite to Community' ),
759+ backgroundColor: scheme.surface,
760+ title: Text (
761+ 'Invite to Community' ,
762+ style: TextStyle (color: scheme.onSurface),
763+ ),
747764 content: Column (
748765 mainAxisSize: MainAxisSize .min,
749766 crossAxisAlignment: CrossAxisAlignment .start,
750767 children: < Widget > [
751768 Text (
752769 community.name,
753- style: const TextStyle (
754- color: Colors .white ,
770+ style: TextStyle (
771+ color: scheme.onSurface ,
755772 fontWeight: FontWeight .w700,
756773 ),
757774 ),
@@ -767,14 +784,20 @@ Future<void> _showCommunityInviteDialog(
767784 const SizedBox (height: 8 ),
768785 SelectableText (
769786 inviteLink,
770- style: const TextStyle (color: Colors .white70, fontSize: 12 ),
787+ style: TextStyle (
788+ color: scheme.onSurface.withValues (alpha: 0.72 ),
789+ fontSize: 12 ,
790+ ),
771791 ),
772792 if (community.isPrivate)
773- const Padding (
793+ Padding (
774794 padding: EdgeInsets .only (top: 8 ),
775795 child: Text (
776796 'Private communities require this invite code or link.' ,
777- style: TextStyle (color: Colors .white54, fontSize: 12 ),
797+ style: TextStyle (
798+ color: scheme.onSurface.withValues (alpha: 0.6 ),
799+ fontSize: 12 ,
800+ ),
778801 ),
779802 ),
780803 ],
0 commit comments