Replace inline Colors.* with SojornColors tokens in chain_quote, interactive_reply_block, sojorn_swipeable_post
This commit is contained in:
parent
4512ff11d1
commit
9ec4ad408d
|
|
@ -1,6 +1,7 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import '../models/post.dart';
|
||||
import '../theme/app_theme.dart';
|
||||
import '../theme/tokens.dart';
|
||||
import 'media/signed_media_image.dart';
|
||||
import 'reactions/reactions_display.dart';
|
||||
|
||||
|
|
@ -29,7 +30,7 @@ class ChainQuoteWidget extends StatelessWidget {
|
|||
right: AppTheme.spacingMd,
|
||||
),
|
||||
child: Material(
|
||||
color: Colors.transparent,
|
||||
color: SojornColors.transparent,
|
||||
child: InkWell(
|
||||
onTap: onTap,
|
||||
child: Container(
|
||||
|
|
@ -67,7 +68,7 @@ class ChainQuoteWidget extends StatelessWidget {
|
|||
? handle[0].toUpperCase()
|
||||
: '?',
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
color: SojornColors.basicWhite,
|
||||
fontSize: 10,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import 'package:flutter_animate/flutter_animate.dart';
|
|||
import 'package:google_fonts/google_fonts.dart';
|
||||
import '../../models/post.dart';
|
||||
import '../../theme/app_theme.dart';
|
||||
import '../../theme/tokens.dart';
|
||||
import '../media/signed_media_image.dart';
|
||||
|
||||
enum BlockState {
|
||||
|
|
@ -127,7 +128,7 @@ class _InteractiveReplyBlockState extends State<InteractiveReplyBlock>
|
|||
return SizedBox(
|
||||
width: 160,
|
||||
child: Material(
|
||||
color: Colors.transparent,
|
||||
color: SojornColors.transparent,
|
||||
child: InkWell(
|
||||
onTap: _handleTap,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
|
|
@ -244,7 +245,7 @@ class _InteractiveReplyBlockState extends State<InteractiveReplyBlock>
|
|||
],
|
||||
),
|
||||
child: Material(
|
||||
color: Colors.transparent,
|
||||
color: SojornColors.transparent,
|
||||
child: InkWell(
|
||||
onTap: _handleTap,
|
||||
borderRadius: BorderRadius.circular(
|
||||
|
|
@ -420,7 +421,7 @@ class _InteractiveReplyBlockState extends State<InteractiveReplyBlock>
|
|||
_buildStatItem(
|
||||
icon: Icons.favorite_border,
|
||||
count: widget.post.likeCount ?? 0,
|
||||
color: Colors.red,
|
||||
color: SojornColors.destructive,
|
||||
),
|
||||
const SizedBox(width: 16),
|
||||
_buildStatItem(
|
||||
|
|
@ -474,7 +475,7 @@ class _InteractiveReplyBlockState extends State<InteractiveReplyBlock>
|
|||
label: const Text('Reply'),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: AppTheme.brightNavy,
|
||||
foregroundColor: Colors.white,
|
||||
foregroundColor: SojornColors.basicWhite,
|
||||
padding: const EdgeInsets.symmetric(vertical: 10),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
|
|
@ -487,7 +488,7 @@ class _InteractiveReplyBlockState extends State<InteractiveReplyBlock>
|
|||
onPressed: widget.onToggleLike,
|
||||
icon: Icon(
|
||||
isLiked ? Icons.favorite : Icons.favorite_border,
|
||||
color: isLiked ? Colors.red : AppTheme.textSecondary,
|
||||
color: isLiked ? SojornColors.destructive : AppTheme.textSecondary,
|
||||
),
|
||||
style: IconButton.styleFrom(
|
||||
backgroundColor: AppTheme.navyBlue.withValues(alpha: 0.08),
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import '../../services/auth_service.dart';
|
|||
import '../../models/post.dart';
|
||||
import '../../providers/api_provider.dart';
|
||||
import '../../theme/app_theme.dart';
|
||||
import '../../theme/tokens.dart';
|
||||
import '../../theme/theme_extensions.dart';
|
||||
import '../media/signed_media_image.dart';
|
||||
import 'package:timeago/timeago.dart' as timeago;
|
||||
|
|
@ -193,9 +194,9 @@ class _sojornSwipeablePostState extends ConsumerState<sojornSwipeablePost> {
|
|||
begin: Alignment.bottomCenter,
|
||||
end: Alignment.topCenter,
|
||||
colors: [
|
||||
Colors.black.withOpacity(0.85),
|
||||
Colors.black.withOpacity(0.4),
|
||||
Colors.transparent,
|
||||
const Color(0xD9000000),
|
||||
const Color(0x66000000),
|
||||
SojornColors.transparent,
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
@ -214,8 +215,8 @@ class _sojornSwipeablePostState extends ConsumerState<sojornSwipeablePost> {
|
|||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
Colors.black.withOpacity(0.6),
|
||||
Colors.transparent,
|
||||
const Color(0x99000000),
|
||||
SojornColors.transparent,
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
@ -316,7 +317,7 @@ class _sojornSwipeablePostState extends ConsumerState<sojornSwipeablePost> {
|
|||
.substring(0, 1)
|
||||
.toUpperCase(),
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
color: SojornColors.basicWhite,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
|
|
@ -497,7 +498,7 @@ class _sojornSwipeablePostState extends ConsumerState<sojornSwipeablePost> {
|
|||
: Icons.favorite_outline,
|
||||
count: widget.post.likeCount ?? 0,
|
||||
onTap: widget.onLike,
|
||||
color: widget.post.isLiked == true ? Colors.red : Colors.white,
|
||||
color: widget.post.isLiked == true ? SojornColors.destructive : SojornColors.basicWhite,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
|
||||
|
|
@ -579,14 +580,14 @@ class _ActionButton extends StatelessWidget {
|
|||
children: [
|
||||
IconButton(
|
||||
onPressed: onTap,
|
||||
icon: Icon(icon, color: color ?? Colors.white, size: 32),
|
||||
icon: Icon(icon, color: color ?? SojornColors.basicWhite, size: 32),
|
||||
tooltip: tooltip,
|
||||
),
|
||||
if (count != null && count! > 0)
|
||||
Text(
|
||||
_formatCount(count!),
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
color: SojornColors.basicWhite,
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
|
|
|
|||
Loading…
Reference in a new issue