feat: 点赞投币状态刷新

This commit is contained in:
guozhigq
2023-07-26 00:16:42 +08:00
parent 7745ea076b
commit 9e5b7a405f
3 changed files with 23 additions and 11 deletions

View File

@ -44,14 +44,22 @@ class ActionRowItem extends StatelessWidget {
AnimatedOpacity(
opacity: loadingStatus! ? 0 : 1,
duration: const Duration(milliseconds: 200),
child: Text(
text ?? '',
style: TextStyle(
color: selectStatus
? Theme.of(context).colorScheme.primary
: null,
fontSize:
Theme.of(context).textTheme.labelMedium?.fontSize),
child: AnimatedSwitcher(
duration: const Duration(milliseconds: 300),
transitionBuilder:
(Widget child, Animation<double> animation) {
return ScaleTransition(scale: animation, child: child);
},
child: Text(
text ?? '',
key: ValueKey<String>(text ?? ''),
style: TextStyle(
color: selectStatus
? Theme.of(context).colorScheme.primary
: null,
fontSize:
Theme.of(context).textTheme.labelSmall!.fontSize),
),
),
),
],