diff --git a/lib/widgets/data_display/medical/LabResult/FlowChartPage.dart b/lib/widgets/data_display/medical/LabResult/FlowChartPage.dart index e0f9d997..37151ea2 100644 --- a/lib/widgets/data_display/medical/LabResult/FlowChartPage.dart +++ b/lib/widgets/data_display/medical/LabResult/FlowChartPage.dart @@ -55,13 +55,15 @@ class FlowChartPage extends StatelessWidget { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text( - filterName ?? "", - style: TextStyle( - fontSize: 21, - fontWeight: FontWeight.w700, - color: Colors.black, - letterSpacing: -0.64, + Expanded( + child: Text( + filterName ?? "", + style: TextStyle( + fontSize: 21, + fontWeight: FontWeight.w700, + color: Colors.black, + letterSpacing: -0.64, + ), ), ), GestureDetector( @@ -123,7 +125,12 @@ class FlowChartPage extends StatelessWidget { onTap: () { model.createFullGraphDatPoints(() { Navigator.push(context, MaterialPageRoute(builder: (_) { - return FullScreenGraph(completeeGraphValues: model.completeeGraphValues, threshold: model.threshold, maxY: model.maxYForCompleteGraph); + return FullScreenGraph( + completeeGraphValues: model.completeeGraphValues, + threshold: model.threshold, + maxY: model.maxYForCompleteGraph, + appBarTitle: filterName ?? TranslationBase.of(context).labResult, + ); })); }); }, diff --git a/lib/widgets/data_display/medical/LabResult/full_screen_lab_result_graph.dart b/lib/widgets/data_display/medical/LabResult/full_screen_lab_result_graph.dart index 65412e14..7ce7dd41 100644 --- a/lib/widgets/data_display/medical/LabResult/full_screen_lab_result_graph.dart +++ b/lib/widgets/data_display/medical/LabResult/full_screen_lab_result_graph.dart @@ -12,19 +12,20 @@ class FullScreenGraph extends StatelessWidget { final double maxY; - const FullScreenGraph( - {super.key, - required this.completeeGraphValues, - required this.threshold, - required this.maxY}); + final String appBarTitle; + + const FullScreenGraph({super.key, required this.completeeGraphValues, required this.threshold, required this.maxY, required this.appBarTitle}); + @override Widget build(BuildContext context) { return AppScaffold( isShowAppBar: true, - appBarTitle: TranslationBase.of(context).labResult, + // appBarTitle: TranslationBase.of(context).labResult, + appBarTitle: appBarTitle, showNewAppBar: true, showNewAppBarTitle: true, - showHomeAppBarIcon: false,backgroundColor: Color(0xffF8F8F8), + showHomeAppBarIcon: false, + backgroundColor: Color(0xffF8F8F8), body: RotatedBox( quarterTurns: 1, child: SizedBox( @@ -40,33 +41,32 @@ class FullScreenGraph extends StatelessWidget { dataPoints: completeeGraphValues, thresholds: threshold, maxY: maxY, - width:((completeeGraphValues.length <=2)? MediaQuery.sizeOf(context).height : (MediaQuery.sizeOf(context).height* ( - completeeGraphValues.length <= 15 - ? 1 - : (completeeGraphValues.length/15)) - ) )-100, - maxX: completeeGraphValues.length+1, - // width: MediaQuery.sizeOf(context).height - 100, + width: ((completeeGraphValues.length <= 2) + ? MediaQuery.sizeOf(context).height + : (MediaQuery.sizeOf(context).height * (completeeGraphValues.length <= 15 ? 1 : (completeeGraphValues.length / 15)))) - + 100, + maxX: completeeGraphValues.length + 1, + // width: MediaQuery.sizeOf(context).height - 100, scrollDirection: Axis.horizontal, height: MediaQuery.sizeOf(context).width, showBottomTitleDates: true, isFullScreeGraph: true, - // isFullScreenGraph: false, + // isFullScreenGraph: false, + ), ), ), ), ), ), - ), ); } - // double getMax(List dataPoints) { - // double max = double.negativeInfinity; - // for (var point in dataPoints) { - // if (point.value > max) { - // max = point.y; - // } - // } - // return max; - // } +// double getMax(List dataPoints) { +// double max = double.negativeInfinity; +// for (var point in dataPoints) { +// if (point.value > max) { +// max = point.y; +// } +// } +// return max; +// } }