Testing Dashboard Chart

main_design2.0
zaid_daoud 2 years ago
parent 63cbbe48d1
commit 456dc4bd77

@ -1,11 +1,54 @@
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 {
ProgressFragment({Key key}) : super(key: key);
const ProgressFragment({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
// TODO: implement build
return Container();
const Map<String, double> statuses = {
"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);
}
}

@ -877,6 +877,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "5.1.0"
pie_chart:
dependency: "direct main"
description:
name: pie_chart
sha256: "5dba6d0eb4718e8ed00a9079361cd8947c3f84ac5a5d76f05a27f4ec5e27589e"
url: "https://pub.dev"
source: hosted
version: "5.3.2"
platform:
dependency: transitive
description:

@ -72,6 +72,7 @@ dependencies:
lottie: ^2.3.0
shimmer: ^2.0.0
flutter_advanced_switch: ^3.0.1
pie_chart: ^5.3.2
dev_dependencies:
flutter_test:

Loading…
Cancel
Save