|
|
|
|
@ -278,66 +278,69 @@ class _ProgressFragmentState extends State<ProgressFragment> with SingleTickerPr
|
|
|
|
|
8.height,
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
|
|
|
spacing: 60.toScreenWidth,
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 3,
|
|
|
|
|
child: SizedBox(
|
|
|
|
|
height: 124.toScreenWidth,
|
|
|
|
|
width: 124.toScreenWidth,
|
|
|
|
|
child: PieChart(
|
|
|
|
|
dataMap: {for (var v in chartData) v.x: v.y},
|
|
|
|
|
animationDuration: const Duration(milliseconds: 750),
|
|
|
|
|
chartLegendSpacing: 0,
|
|
|
|
|
chartRadius: 124,
|
|
|
|
|
colorList: chartData.map((element) => element.color).toList(),
|
|
|
|
|
initialAngleInDegree: 270,
|
|
|
|
|
chartType: ChartType.ring,
|
|
|
|
|
ringStrokeWidth: 32,
|
|
|
|
|
legendOptions: LegendOptions(
|
|
|
|
|
showLegendsInRow: true,
|
|
|
|
|
legendPosition: LegendPosition.top,
|
|
|
|
|
showLegends: false,
|
|
|
|
|
legendTextStyle: AppTextStyles.textStyle9,
|
|
|
|
|
),
|
|
|
|
|
chartValuesOptions: ChartValuesOptions(
|
|
|
|
|
showChartValueBackground: true,
|
|
|
|
|
chartValueBackgroundColor: const Color(0xff226187).withValues(alpha: .75),
|
|
|
|
|
chartValueStyle: AppTextStyles.tinyFont2.copyWith(height: 1.5, color: Colors.white),
|
|
|
|
|
showChartValues: true,
|
|
|
|
|
showChartValuesInPercentage: true,
|
|
|
|
|
showChartValuesOutside: true,
|
|
|
|
|
decimalPlaces: 0,
|
|
|
|
|
),
|
|
|
|
|
).toShimmer(isShow: snapshot.isAllCountLoading, radius: 250, context: context).paddingAll(0),
|
|
|
|
|
),
|
|
|
|
|
child: Center(
|
|
|
|
|
child: AspectRatio(
|
|
|
|
|
aspectRatio: 1,
|
|
|
|
|
child: PieChart(
|
|
|
|
|
dataMap: {for (var v in chartData) v.x: v.y},
|
|
|
|
|
animationDuration: const Duration(milliseconds: 750),
|
|
|
|
|
chartLegendSpacing: 0,
|
|
|
|
|
chartRadius: MediaQuery.of(context).size.width * 0.35,
|
|
|
|
|
colorList: chartData.map((element) => element.color).toList(),
|
|
|
|
|
initialAngleInDegree: 270,
|
|
|
|
|
chartType: ChartType.ring,
|
|
|
|
|
ringStrokeWidth: 32.toScreenWidth,
|
|
|
|
|
legendOptions: LegendOptions(
|
|
|
|
|
showLegendsInRow: true,
|
|
|
|
|
legendPosition: LegendPosition.top,
|
|
|
|
|
showLegends: false,
|
|
|
|
|
legendTextStyle: AppTextStyles.textStyle9,
|
|
|
|
|
),
|
|
|
|
|
chartValuesOptions: ChartValuesOptions(
|
|
|
|
|
showChartValueBackground: true,
|
|
|
|
|
chartValueBackgroundColor: const Color(0xff226187).withValues(alpha: .75),
|
|
|
|
|
chartValueStyle: AppTextStyles.tinyFont2.copyWith(height: 1.5, color: Colors.white),
|
|
|
|
|
showChartValues: true,
|
|
|
|
|
showChartValuesInPercentage: true,
|
|
|
|
|
showChartValuesOutside: true,
|
|
|
|
|
decimalPlaces: 0,
|
|
|
|
|
),
|
|
|
|
|
).toShimmer(isShow: snapshot.isAllCountLoading, radius: 250, context: context),
|
|
|
|
|
),
|
|
|
|
|
).paddingOnly(top: 14,bottom: 14),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 2,
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
spacing: 8,
|
|
|
|
|
children: [
|
|
|
|
|
for (int i = 0; i < chartData.length; i++)
|
|
|
|
|
Row(
|
|
|
|
|
spacing: 16,
|
|
|
|
|
spacing: 16.toScreenWidth,
|
|
|
|
|
children: [
|
|
|
|
|
chartData[i].icon.toSvgAsset(height: 26, width: 26, color: chartData[i].color).toShimmer(isShow: snapshot.isAllCountLoading, context: context),
|
|
|
|
|
Column(
|
|
|
|
|
spacing: 4,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Text(chartData[i].x, style: AppTextStyles.textStyle9.copyWith(color: AppColor.text9Color(context)))
|
|
|
|
|
.toShimmer(isShow: snapshot.isAllCountLoading, context: context),
|
|
|
|
|
Text("${chartData[i].y.toInt()}", style: AppTextStyles.bodyText.copyWith(color: AppColor.headingTextColor(context)))
|
|
|
|
|
.toShimmer(isShow: snapshot.isAllCountLoading, context: context),
|
|
|
|
|
],
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
spacing: 4.toScreenHeight,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Text(chartData[i].x, style: AppTextStyles.textStyle9.copyWith(color: AppColor.text9Color(context)))
|
|
|
|
|
.toShimmer(isShow: snapshot.isAllCountLoading, context: context),
|
|
|
|
|
Text("${chartData[i].y.toInt()}", style: AppTextStyles.bodyText.copyWith(color: AppColor.headingTextColor(context)))
|
|
|
|
|
.toShimmer(isShow: snapshot.isAllCountLoading, context: context),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
).paddingOnly(top: 4,bottom: 4),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
).expanded,
|
|
|
|
|
|