Created
December 25, 2022 21:02
-
-
Save josue1dario2/88617da2ecc1ce3af5276295ef8975a0 to your computer and use it in GitHub Desktop.
3 - PresenteeismIndicator
This file contains 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 PresenteeismIndicator extends StatefulWidget { | |
const PresenteeismIndicator({super.key}); | |
@override | |
State<PresenteeismIndicator> createState() => _PresenteeismIndicatorState(); | |
} | |
class _PresenteeismIndicatorState extends State<PresenteeismIndicator> { | |
@override | |
Widget build(BuildContext context) { | |
int value = 75; | |
return Center( | |
child: Row( | |
mainAxisAlignment: MainAxisAlignment.center, | |
children: [ | |
CircularPercentIndicator( | |
animation: true, | |
animationDuration: 1000, | |
radius: 12, | |
lineWidth: 5, | |
percent: Service.toDouble(value), | |
progressColor: const Color(0xFF0BCE83), | |
backgroundColor: const Color(0xFFF3F3F4), | |
circularStrokeCap: CircularStrokeCap.round, | |
), | |
const SizedBox( | |
width: 5, | |
), | |
Text('${Service.text(value)}%', style: CustomTextStyle.percentTitle) | |
], | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment