Minor changes

This commit is contained in:
Juan Gilsanz Polo 2022-10-26 17:27:45 +02:00
parent 5e30ac4986
commit 33f24f72e5

View file

@ -28,16 +28,19 @@ class ColorItem extends StatelessWidget {
width: 50, width: 50,
height: 50, height: 50,
decoration: BoxDecoration( decoration: BoxDecoration(
color: color.withOpacity(0.6), color: color,
borderRadius: BorderRadius.circular(50) borderRadius: BorderRadius.circular(50)
), ),
child: selectedValue != null && selectedValue == numericValue child: AnimatedOpacity(
? Icon( opacity: numericValue == selectedValue ? 1 : 0,
duration: const Duration(milliseconds: 200),
curve: Curves.easeInOut,
child: Icon(
Icons.check, Icons.check,
size: 30, size: 30,
color: color.computeLuminance() > 0.5 ? Colors.black : Colors.white, color: color.computeLuminance() > 0.5 ? Colors.black : Colors.white,
) ),
: null, ),
), ),
), ),
), ),