From fd5c4463d20a7a38d46cd0e83cc1b48c6c8f0561 Mon Sep 17 00:00:00 2001 From: guozhigq Date: Sun, 1 Oct 2023 14:27:21 +0800 Subject: [PATCH] =?UTF-8?q?mod:=20=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E5=A4=9A=E9=80=89=E9=80=89=E4=B8=AD=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/history/widgets/item.dart | 47 +++++++++++++++-------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/lib/pages/history/widgets/item.dart b/lib/pages/history/widgets/item.dart index b8757d68..7f0be6a0 100644 --- a/lib/pages/history/widgets/item.dart +++ b/lib/pages/history/widgets/item.dart @@ -217,31 +217,32 @@ class HistoryItem extends StatelessWidget { child: SizedBox( width: 34, height: 34, - child: IconButton( - style: ButtonStyle( - padding: MaterialStateProperty.all( - EdgeInsets.zero), - backgroundColor: - MaterialStateProperty.resolveWith( - (states) { - return Colors.white - .withOpacity(0.8); - }, + child: AnimatedScale( + scale: videoItem.checked ? 1 : 0, + duration: + const Duration(milliseconds: 250), + curve: Curves.easeInOut, + child: IconButton( + style: ButtonStyle( + padding: MaterialStateProperty.all( + EdgeInsets.zero), + backgroundColor: + MaterialStateProperty + .resolveWith( + (states) { + return Colors.white + .withOpacity(0.8); + }, + ), ), - ), - onPressed: () { - feedBack(); - onChoose!(); - }, - icon: Icon( - Icons.done_all_outlined, - color: videoItem.checked - ? Theme.of(context) + onPressed: () { + feedBack(); + onChoose!(); + }, + icon: Icon(Icons.done_all_outlined, + color: Theme.of(context) .colorScheme - .primary - : Theme.of(context) - .colorScheme - .outline, + .primary), ), ), ),