Created
January 2, 2023 02:51
-
-
Save josue1dario2/6ea936c7841f7c08dcc5301d23d1d8ca to your computer and use it in GitHub Desktop.
5. ActiveIndicatorRefactor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ActiveIndicator extends StatelessWidget { | |
const ActiveIndicator( | |
{super.key, | |
required this.value, | |
required this.color, | |
required this.sizeIcon, | |
required this.sizeText}); | |
final double sizeIcon; | |
final double sizeText; | |
final int value; | |
final Color color; | |
@override | |
Widget build(BuildContext context) { | |
return Center( | |
child: Row( | |
mainAxisAlignment: MainAxisAlignment.center, | |
children: [ | |
Image( | |
width: sizeIcon, | |
image: const AssetImage('assets/img/Dot.png'), | |
color: (Service.isActive(value)) | |
? const Color(0xFF4BE1A0) | |
: const Color(0xFFDADADA)), | |
const SizedBox( | |
width: 10, | |
), | |
CustomText( | |
text: Service.text(value), | |
//25 | |
size: sizeText, | |
weight: FontWeight.w800, | |
color: color) | |
], | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment