Wd: Full portrait graph added.
parent
c09170b506
commit
656d8dd6b4
@ -0,0 +1,59 @@
|
|||||||
|
import 'package:diplomaticquarterapp/core/viewModels/medical/labs_view_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/data_display/medical/LabResult/lab_result_graph.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class FullScreenGraph extends StatelessWidget {
|
||||||
|
final List<DataPoint> completeeGraphValues ;
|
||||||
|
final List<ThresholdRange> threshold ;
|
||||||
|
|
||||||
|
const FullScreenGraph({super.key, required this.completeeGraphValues, required this.threshold});
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return AppScaffold(
|
||||||
|
isShowAppBar: true,
|
||||||
|
appBarTitle: TranslationBase.of(context).labResult,
|
||||||
|
showNewAppBar: true,
|
||||||
|
showNewAppBarTitle: true,
|
||||||
|
backgroundColor: Color(0xffF8F8F8),
|
||||||
|
body: RotatedBox(
|
||||||
|
quarterTurns: 1,
|
||||||
|
child: SizedBox(
|
||||||
|
// width: MediaQuery.sizeOf(context).height,
|
||||||
|
height: MediaQuery.sizeOf(context).width,
|
||||||
|
child: Material(
|
||||||
|
color: Colors.white,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 18),
|
||||||
|
child: DynamicResultChart(
|
||||||
|
dataPoints: completeeGraphValues,
|
||||||
|
thresholds: threshold,
|
||||||
|
// width:((completeeGraphValues.length <=2)? MediaQuery.sizeOf(context).height : (MediaQuery.sizeOf(context).height* (
|
||||||
|
// completeeGraphValues.length <= 3
|
||||||
|
// ? 1
|
||||||
|
// : (completeeGraphValues.length/3))
|
||||||
|
// ) )-77,
|
||||||
|
width: MediaQuery.sizeOf(context).height-100,
|
||||||
|
maxX: completeeGraphValues.length.toDouble(),
|
||||||
|
scrollDirection: Axis.horizontal,
|
||||||
|
height: MediaQuery.sizeOf(context).width,
|
||||||
|
isFullScreenGraph: true,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
// double getMax(List<DataPoint> dataPoints) {
|
||||||
|
// double max = double.negativeInfinity;
|
||||||
|
// for (var point in dataPoints) {
|
||||||
|
// if (point.value > max) {
|
||||||
|
// max = point.y;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// return max;
|
||||||
|
// }
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue