|
|
|
|
@ -1,8 +1,7 @@
|
|
|
|
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/screens/home/Label.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/screens/home/label.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/util/helpers.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
@ -13,30 +12,40 @@ class GetOutPatientStack extends StatelessWidget {
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
double barHeight =
|
|
|
|
|
SizeConfig.heightMultiplier * (SizeConfig.isHeightVeryShort ? 23 : 19);
|
|
|
|
|
value.summaryoptions
|
|
|
|
|
.sort((Summaryoptions a, Summaryoptions b) => b.value - a.value);
|
|
|
|
|
|
|
|
|
|
var list = new List<Widget>();
|
|
|
|
|
value.summaryoptions.forEach((result) =>
|
|
|
|
|
{list.add(getStack(result, value.summaryoptions.first.value,context))});
|
|
|
|
|
value.summaryoptions.forEach((result) => {
|
|
|
|
|
list.add(getStack(
|
|
|
|
|
result, value.summaryoptions.first.value, context, barHeight))
|
|
|
|
|
});
|
|
|
|
|
return Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 5,vertical: 5),
|
|
|
|
|
child: Label(firstLine:Helpers.getLabelFromKPI(value.kPIName) ,secondLine:Helpers.getNameFromKPI(value.kPIName),color: Color(0xFF2B353E), ),
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 5, vertical: 5),
|
|
|
|
|
child: Label(
|
|
|
|
|
firstLine: Helpers.getLabelFromKPI(value.kPIName),
|
|
|
|
|
secondLine: Helpers.getNameFromKPI(value.kPIName),
|
|
|
|
|
color: Color(0xFF2B353E),
|
|
|
|
|
fontSize: SizeConfig.getHeightMultiplier(height: barHeight) *
|
|
|
|
|
(SizeConfig.isHeightVeryShort
|
|
|
|
|
? 5
|
|
|
|
|
: SizeConfig.isHeightShort
|
|
|
|
|
? 9
|
|
|
|
|
: 12),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: list)
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getStack(Summaryoptions value, max,context) {
|
|
|
|
|
double barHeight = SizeConfig.heightMultiplier *
|
|
|
|
|
(SizeConfig.isHeightVeryShort ? 23 : 19);
|
|
|
|
|
getStack(Summaryoptions value, max, context, barHeight) {
|
|
|
|
|
return Expanded(
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: 2),
|
|
|
|
|
|