Maximum dates that show in that percentage indicator was 20
If my current pending day is 10 then it will be show like half of the progress bar.
how can I show like this?
Sample code here:
class _ApplyLeaveState extends State<ApplyLeave> {
double percent = 20.0;
Widget build(BuildContext context) {
double height = MediaQuery
.of(context)
.size
.height;
double width = MediaQuery
.of(context)
.size
.width;
return WillPopScope(
onWillPop: () async {
return false;
},
child: Scaffold(
backgroundColor: Colors.white,
drawer: SideBar(),
appBar: AppBar(
title: Text(app_leave),
),
body: Container(
height: MediaQuery.of(context).size.height,
width: MediaQuery.of(context).size.width,
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(top: 15.0),
child: Align(
alignment: Alignment.center,
child: CircularPercentIndicator(
radius: 100.0,
lineWidth: 15.0,
percent: 0.6,
center: Text(
leave_pending,
style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.w600,
color: Colors.black),
),
backgroundColor: Colors.grey,
circularStrokeCap: CircularStrokeCap.round,
progressColor: Colors.blue,
),
),
),
I have tried this code?
2
Answers
The logic will be
You can play with widget.