dashboard ui fixes

export_module_ui_ux_enhancement
WaseemAbbasi22 4 weeks ago
parent 7d25f2be01
commit 614cb48dff

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

Loading…
Cancel
Save