mod: 历史记录多选选中样式

This commit is contained in:
guozhigq
2023-10-01 14:27:21 +08:00
parent 7fcbe4dd9d
commit fd5c4463d2

View File

@ -217,12 +217,18 @@ class HistoryItem extends StatelessWidget {
child: SizedBox( child: SizedBox(
width: 34, width: 34,
height: 34, height: 34,
child: AnimatedScale(
scale: videoItem.checked ? 1 : 0,
duration:
const Duration(milliseconds: 250),
curve: Curves.easeInOut,
child: IconButton( child: IconButton(
style: ButtonStyle( style: ButtonStyle(
padding: MaterialStateProperty.all( padding: MaterialStateProperty.all(
EdgeInsets.zero), EdgeInsets.zero),
backgroundColor: backgroundColor:
MaterialStateProperty.resolveWith( MaterialStateProperty
.resolveWith(
(states) { (states) {
return Colors.white return Colors.white
.withOpacity(0.8); .withOpacity(0.8);
@ -233,15 +239,10 @@ class HistoryItem extends StatelessWidget {
feedBack(); feedBack();
onChoose!(); onChoose!();
}, },
icon: Icon( icon: Icon(Icons.done_all_outlined,
Icons.done_all_outlined, color: Theme.of(context)
color: videoItem.checked
? Theme.of(context)
.colorScheme .colorScheme
.primary .primary),
: Theme.of(context)
.colorScheme
.outline,
), ),
), ),
), ),