Skip to content

Instantly share code, notes, and snippets.

@josue1dario2
Created December 25, 2022 21:02
Show Gist options
  • Save josue1dario2/88617da2ecc1ce3af5276295ef8975a0 to your computer and use it in GitHub Desktop.
Save josue1dario2/88617da2ecc1ce3af5276295ef8975a0 to your computer and use it in GitHub Desktop.
3 - PresenteeismIndicator
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