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