chore: make emoji choice shimmer background match word card background (#5116)

This commit is contained in:
ggurdin 2026-01-07 12:16:05 -05:00 committed by GitHub
parent 3666a3875d
commit 57ecf08801
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View file

@ -7,12 +7,14 @@ import 'package:fluffychat/config/app_config.dart';
class ShimmerBackground extends StatelessWidget {
final Widget child;
final Color shimmerColor;
final Color? baseColor;
final bool enabled;
const ShimmerBackground({
super.key,
required this.child,
this.shimmerColor = AppConfig.goldLight,
this.baseColor,
this.enabled = true,
});
@ -27,7 +29,7 @@ class ShimmerBackground extends StatelessWidget {
child: ClipRRect(
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
child: Shimmer.fromColors(
baseColor: shimmerColor.withValues(alpha: 0.1),
baseColor: baseColor ?? shimmerColor.withValues(alpha: 0.1),
highlightColor: shimmerColor.withValues(alpha: 0.6),
direction: ShimmerDirection.ltr,
child: Container(

View file

@ -184,6 +184,7 @@ class EmojiChoiceItemState extends State<EmojiChoiceItem> {
shimmerColor: (Theme.of(context).brightness == Brightness.dark)
? Colors.white
: Theme.of(context).colorScheme.primary,
baseColor: Theme.of(context).colorScheme.surface,
child: CompositedTransformTarget(
link: MatrixState.pAnyState
.layerLinkAndKey(widget.transformTargetId)