Testing Dashboard Chart
parent
63cbbe48d1
commit
456dc4bd77
@ -1,11 +1,54 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:pie_chart/pie_chart.dart';
|
||||||
|
import 'package:test_sa/extensions/int_extensions.dart';
|
||||||
|
import 'package:test_sa/extensions/text_extensions.dart';
|
||||||
|
import 'package:test_sa/extensions/widget_extensions.dart';
|
||||||
|
import 'package:test_sa/new_views/app_style/app_color.dart';
|
||||||
|
import 'package:test_sa/views/app_style/colors.dart';
|
||||||
|
|
||||||
class ProgressFragment extends StatelessWidget {
|
class ProgressFragment extends StatelessWidget {
|
||||||
ProgressFragment({Key key}) : super(key: key);
|
const ProgressFragment({Key key}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
// TODO: implement build
|
const Map<String, double> statuses = {
|
||||||
return Container();
|
"Completed": 12,
|
||||||
|
"In Progress": 12,
|
||||||
|
"Open": 12,
|
||||||
|
};
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
Card(
|
||||||
|
child: Stack(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
children: [
|
||||||
|
PieChart(
|
||||||
|
dataMap: statuses,
|
||||||
|
animationDuration: const Duration(milliseconds: 800),
|
||||||
|
chartRadius: 190.toScreenWidth,
|
||||||
|
colorList: [AColors.statusGreen, AColors.statusBlue, AColors.statusYellowLight],
|
||||||
|
initialAngleInDegree: 270,
|
||||||
|
chartType: ChartType.ring,
|
||||||
|
ringStrokeWidth: 40.toScreenWidth,
|
||||||
|
legendOptions: const LegendOptions(showLegends: false),
|
||||||
|
chartValuesOptions: ChartValuesOptions(
|
||||||
|
chartValueBackgroundColor: Colors.transparent,
|
||||||
|
chartValueStyle: AppTextStyles.heading6.copyWith(color: AppColor.neutral20),
|
||||||
|
showChartValuesOutside: true,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
"Total".heading5(context),
|
||||||
|
"20".heading6(context).custom(color: AppColor.neutral20),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
).paddingAll(23),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
).paddingOnly(start: 16, end: 16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue