|
|
|
@ -148,7 +148,7 @@ class LabResultDetails extends StatelessWidget {
|
|
|
|
borderRadius: 24.h,
|
|
|
|
borderRadius: 24.h,
|
|
|
|
hasShadow: true,
|
|
|
|
hasShadow: true,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
height: 260.h,
|
|
|
|
height: model.isGraphVisible?260.h:(labmodel.filteredGraphValues.length<3)?(labmodel.filteredGraphValues.length*64)+80.h:260.h,
|
|
|
|
padding: EdgeInsets.all(16.h),
|
|
|
|
padding: EdgeInsets.all(16.h),
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
|
|
|
@ -173,8 +173,8 @@ class LabResultDetails extends StatelessWidget {
|
|
|
|
//todo handle when the graph icon is being displayed
|
|
|
|
//todo handle when the graph icon is being displayed
|
|
|
|
Utils.buildSvgWithAssets(
|
|
|
|
Utils.buildSvgWithAssets(
|
|
|
|
icon: model.isGraphVisible?AppAssets.ic_list:AppAssets.ic_graph,
|
|
|
|
icon: model.isGraphVisible?AppAssets.ic_list:AppAssets.ic_graph,
|
|
|
|
width: 24,
|
|
|
|
width: 24.h,
|
|
|
|
height: 24)
|
|
|
|
height: 24.h)
|
|
|
|
.onPress(() {
|
|
|
|
.onPress(() {
|
|
|
|
model.alterGraphVisibility();
|
|
|
|
model.alterGraphVisibility();
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
@ -291,7 +291,7 @@ class LabResultDetails extends StatelessWidget {
|
|
|
|
|
|
|
|
|
|
|
|
Widget labHistoryList(LabRangeViewModel model, LabViewModel labmodel) {
|
|
|
|
Widget labHistoryList(LabRangeViewModel model, LabViewModel labmodel) {
|
|
|
|
return SizedBox(
|
|
|
|
return SizedBox(
|
|
|
|
height: 180.h,
|
|
|
|
height: labmodel.filteredGraphValues.length<3?labmodel.filteredGraphValues.length*64:180.h,
|
|
|
|
child: ListView.separated(
|
|
|
|
child: ListView.separated(
|
|
|
|
padding: EdgeInsets.zero,
|
|
|
|
padding: EdgeInsets.zero,
|
|
|
|
itemCount: labmodel.filteredGraphValues.length,itemBuilder: (context, index){
|
|
|
|
itemCount: labmodel.filteredGraphValues.length,itemBuilder: (context, index){
|
|
|
|
@ -313,6 +313,7 @@ class LabResultDetails extends StatelessWidget {
|
|
|
|
|
|
|
|
|
|
|
|
double? getInterval(LabViewModel labmodel) {
|
|
|
|
double? getInterval(LabViewModel labmodel) {
|
|
|
|
var maxX = labmodel.maxY;
|
|
|
|
var maxX = labmodel.maxY;
|
|
|
|
|
|
|
|
if(maxX<1) return .5;
|
|
|
|
if(maxX >1 && maxX < 5) return 1;
|
|
|
|
if(maxX >1 && maxX < 5) return 1;
|
|
|
|
if(maxX >5 && maxX < 10) return 5;
|
|
|
|
if(maxX >5 && maxX < 10) return 5;
|
|
|
|
if(maxX >10 && maxX < 50) return 10;
|
|
|
|
if(maxX >10 && maxX < 50) return 10;
|
|
|
|
|