|
|
@ -1,4 +1,5 @@
|
|
|
|
import 'package:charts_flutter/flutter.dart' as charts;
|
|
|
|
import 'package:charts_flutter/flutter.dart' as charts;
|
|
|
|
|
|
|
|
import 'package:doctor_app_flutter/config/config.dart';
|
|
|
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
|
|
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/dashboard_view_model.dart';
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/dashboard_view_model.dart';
|
|
|
|
import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart';
|
|
|
|
import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart';
|
|
|
@ -96,19 +97,19 @@ class DashboardReferralPatient extends StatelessWidget {
|
|
|
|
RowCounts(
|
|
|
|
RowCounts(
|
|
|
|
dashboardItemList[2].summaryoptions[0].kPIParameter,
|
|
|
|
dashboardItemList[2].summaryoptions[0].kPIParameter,
|
|
|
|
dashboardItemList[2].summaryoptions[0].value,
|
|
|
|
dashboardItemList[2].summaryoptions[0].value,
|
|
|
|
Colors.black,
|
|
|
|
AppGlobal.appTextColor,
|
|
|
|
height: height,
|
|
|
|
height: height,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
RowCounts(
|
|
|
|
RowCounts(
|
|
|
|
dashboardItemList[2].summaryoptions[1].kPIParameter,
|
|
|
|
dashboardItemList[2].summaryoptions[1].kPIParameter,
|
|
|
|
dashboardItemList[2].summaryoptions[1].value,
|
|
|
|
dashboardItemList[2].summaryoptions[1].value,
|
|
|
|
Colors.grey,
|
|
|
|
Color(0xFFC8D0DC),
|
|
|
|
height: height,
|
|
|
|
height: height,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
RowCounts(
|
|
|
|
RowCounts(
|
|
|
|
dashboardItemList[2].summaryoptions[2].kPIParameter,
|
|
|
|
dashboardItemList[2].summaryoptions[2].kPIParameter,
|
|
|
|
dashboardItemList[2].summaryoptions[2].value,
|
|
|
|
dashboardItemList[2].summaryoptions[2].value,
|
|
|
|
Colors.red,
|
|
|
|
Color(0xFFEC6666),
|
|
|
|
height: height,
|
|
|
|
height: height,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
@ -132,7 +133,7 @@ class DashboardReferralPatient extends StatelessWidget {
|
|
|
|
)
|
|
|
|
)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
top: height * (SizeConfig.isHeightVeryShort ? 0.35 : 0.40),
|
|
|
|
top: height * (SizeConfig.isHeightVeryShort ? 0.35 : 0.35),
|
|
|
|
left: 0,
|
|
|
|
left: 0,
|
|
|
|
right: 0)
|
|
|
|
right: 0)
|
|
|
|
]),
|
|
|
|
]),
|
|
|
@ -146,11 +147,11 @@ class DashboardReferralPatient extends StatelessWidget {
|
|
|
|
static List<charts.Series<GaugeSegment, String>> _createReferralData(List<DashboardModel> dashboardItemList) {
|
|
|
|
static List<charts.Series<GaugeSegment, String>> _createReferralData(List<DashboardModel> dashboardItemList) {
|
|
|
|
final data = [
|
|
|
|
final data = [
|
|
|
|
new GaugeSegment(dashboardItemList[2].summaryoptions[0].kPIParameter,
|
|
|
|
new GaugeSegment(dashboardItemList[2].summaryoptions[0].kPIParameter,
|
|
|
|
getValue(dashboardItemList[1].summaryoptions[0].value), charts.MaterialPalette.black),
|
|
|
|
getValue(dashboardItemList[1].summaryoptions[0].value), charts.ColorUtil.fromDartColor(AppGlobal.appTextColor)),
|
|
|
|
new GaugeSegment(dashboardItemList[2].summaryoptions[1].kPIParameter,
|
|
|
|
new GaugeSegment(dashboardItemList[2].summaryoptions[1].kPIParameter,
|
|
|
|
getValue(dashboardItemList[1].summaryoptions[1].value), charts.MaterialPalette.gray.shadeDefault),
|
|
|
|
getValue(dashboardItemList[1].summaryoptions[1].value), charts.ColorUtil.fromDartColor(Color(0xFFC6CEDA),),),
|
|
|
|
new GaugeSegment(dashboardItemList[2].summaryoptions[2].kPIParameter,
|
|
|
|
new GaugeSegment(dashboardItemList[2].summaryoptions[2].kPIParameter,
|
|
|
|
getValue(dashboardItemList[1].summaryoptions[2].value), charts.MaterialPalette.red.shadeDefault),
|
|
|
|
getValue(dashboardItemList[1].summaryoptions[2].value), charts.ColorUtil.fromDartColor(Color(0xFFEC6666),),),
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
return [
|
|
|
|
return [
|
|
|
@ -158,6 +159,8 @@ class DashboardReferralPatient extends StatelessWidget {
|
|
|
|
id: 'Segments',
|
|
|
|
id: 'Segments',
|
|
|
|
domainFn: (GaugeSegment segment, _) => segment.segment,
|
|
|
|
domainFn: (GaugeSegment segment, _) => segment.segment,
|
|
|
|
measureFn: (GaugeSegment segment, _) => segment.size,
|
|
|
|
measureFn: (GaugeSegment segment, _) => segment.size,
|
|
|
|
|
|
|
|
strokeWidthPxFn: (GaugeSegment segment, _)=>200,
|
|
|
|
|
|
|
|
|
|
|
|
data: data,
|
|
|
|
data: data,
|
|
|
|
colorFn: (GaugeSegment segment, _) => segment.color,
|
|
|
|
colorFn: (GaugeSegment segment, _) => segment.color,
|
|
|
|
)
|
|
|
|
)
|
|
|
|