update-to-3.32-sdk
haroon amjad 3 months ago
parent 4b5f15490c
commit d99b66105e

@ -55,13 +55,15 @@ class FlowChartPage extends StatelessWidget {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Text( Expanded(
filterName ?? "", child: Text(
style: TextStyle( filterName ?? "",
fontSize: 21, style: TextStyle(
fontWeight: FontWeight.w700, fontSize: 21,
color: Colors.black, fontWeight: FontWeight.w700,
letterSpacing: -0.64, color: Colors.black,
letterSpacing: -0.64,
),
), ),
), ),
GestureDetector( GestureDetector(
@ -123,7 +125,12 @@ class FlowChartPage extends StatelessWidget {
onTap: () { onTap: () {
model.createFullGraphDatPoints(() { model.createFullGraphDatPoints(() {
Navigator.push(context, MaterialPageRoute(builder: (_) { 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,
);
})); }));
}); });
}, },

@ -12,19 +12,20 @@ class FullScreenGraph extends StatelessWidget {
final double maxY; final double maxY;
const FullScreenGraph( final String appBarTitle;
{super.key,
required this.completeeGraphValues, const FullScreenGraph({super.key, required this.completeeGraphValues, required this.threshold, required this.maxY, required this.appBarTitle});
required this.threshold,
required this.maxY});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).labResult, // appBarTitle: TranslationBase.of(context).labResult,
appBarTitle: appBarTitle,
showNewAppBar: true, showNewAppBar: true,
showNewAppBarTitle: true, showNewAppBarTitle: true,
showHomeAppBarIcon: false,backgroundColor: Color(0xffF8F8F8), showHomeAppBarIcon: false,
backgroundColor: Color(0xffF8F8F8),
body: RotatedBox( body: RotatedBox(
quarterTurns: 1, quarterTurns: 1,
child: SizedBox( child: SizedBox(
@ -40,33 +41,32 @@ class FullScreenGraph extends StatelessWidget {
dataPoints: completeeGraphValues, dataPoints: completeeGraphValues,
thresholds: threshold, thresholds: threshold,
maxY: maxY, maxY: maxY,
width:((completeeGraphValues.length <=2)? MediaQuery.sizeOf(context).height : (MediaQuery.sizeOf(context).height* ( width: ((completeeGraphValues.length <= 2)
completeeGraphValues.length <= 15 ? MediaQuery.sizeOf(context).height
? 1 : (MediaQuery.sizeOf(context).height * (completeeGraphValues.length <= 15 ? 1 : (completeeGraphValues.length / 15)))) -
: (completeeGraphValues.length/15)) 100,
) )-100, maxX: completeeGraphValues.length + 1,
maxX: completeeGraphValues.length+1, // width: MediaQuery.sizeOf(context).height - 100,
// width: MediaQuery.sizeOf(context).height - 100,
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
height: MediaQuery.sizeOf(context).width, height: MediaQuery.sizeOf(context).width,
showBottomTitleDates: true, showBottomTitleDates: true,
isFullScreeGraph: true, isFullScreeGraph: true,
// isFullScreenGraph: false, // isFullScreenGraph: false,
),
), ),
), ),
), ),
), ),
), ),
),
); );
} }
// double getMax(List<DataPoint> dataPoints) { // double getMax(List<DataPoint> dataPoints) {
// double max = double.negativeInfinity; // double max = double.negativeInfinity;
// for (var point in dataPoints) { // for (var point in dataPoints) {
// if (point.value > max) { // if (point.value > max) {
// max = point.y; // max = point.y;
// } // }
// } // }
// return max; // return max;
// } // }
} }

Loading…
Cancel
Save