Compare commits
26 Commits
5a1bd6a5b8
...
3bbc014251
| Author | SHA1 | Date |
|---|---|---|
|
|
3bbc014251 | 4 weeks ago |
|
|
a4dc0648e8 | 4 weeks ago |
|
|
61007302c9 | 4 weeks ago |
|
|
e5dcabacce | 4 weeks ago |
|
|
a661448d27 | 4 weeks ago |
|
|
c0606fb530 | 4 weeks ago |
|
|
6e24698031 | 4 weeks ago |
|
|
b05e4e2a15 | 4 weeks ago |
|
|
2b21086cc1 | 4 weeks ago |
|
|
483a1571d9 | 4 weeks ago |
|
|
6cf08c04d2 | 4 weeks ago |
|
|
156d7b4834 | 4 weeks ago |
|
|
415c0eb3c7 | 4 weeks ago |
|
|
35e145ddf9 | 4 weeks ago |
|
|
8291e89ee7 | 4 weeks ago |
|
|
903248133e | 4 weeks ago |
|
|
7e92cad55b | 4 weeks ago |
|
|
bbf83d4dc9 | 4 weeks ago |
|
|
3d64ddf78b | 4 weeks ago |
|
|
51c787c92a | 4 weeks ago |
|
|
db979977ca | 4 weeks ago |
|
|
641df8b51b | 4 weeks ago |
|
|
36bf229787 | 4 weeks ago |
|
|
42abf9ca1b | 4 weeks ago |
|
|
2e9a462a1c | 4 weeks ago |
|
|
da89c41925 | 1 month ago |
@ -0,0 +1,40 @@
|
||||
class PatientDentalPlanEstimationResponseModel {
|
||||
dynamic setupID;
|
||||
dynamic estimationNo;
|
||||
int? projectID;
|
||||
String? procedureId;
|
||||
int? patientID;
|
||||
int? sequenceNo;
|
||||
int? neededTime;
|
||||
String? procedureName;
|
||||
String? procedureNameN;
|
||||
|
||||
PatientDentalPlanEstimationResponseModel(
|
||||
{this.setupID, this.estimationNo, this.projectID, this.procedureId, this.patientID, this.sequenceNo, this.neededTime, this.procedureName, this.procedureNameN});
|
||||
|
||||
PatientDentalPlanEstimationResponseModel.fromJson(Map<String, dynamic> json) {
|
||||
setupID = json['SetupID'];
|
||||
estimationNo = json['EstimationNo'];
|
||||
projectID = json['ProjectID'];
|
||||
procedureId = json['ProcedureId'];
|
||||
patientID = json['PatientID'];
|
||||
sequenceNo = json['sequenceNo'];
|
||||
neededTime = json['NeededTime'];
|
||||
procedureName = json['ProcedureName'];
|
||||
procedureNameN = json['ProcedureNameN'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['SetupID'] = this.setupID;
|
||||
data['EstimationNo'] = this.estimationNo;
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['ProcedureId'] = this.procedureId;
|
||||
data['PatientID'] = this.patientID;
|
||||
data['sequenceNo'] = this.sequenceNo;
|
||||
data['NeededTime'] = this.neededTime;
|
||||
data['ProcedureName'] = this.procedureName;
|
||||
data['ProcedureNameN'] = this.procedureNameN;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
class PatientLabSpecialResult {
|
||||
String? invoiceNo;
|
||||
String? moduleID;
|
||||
String? resultData;
|
||||
String? resultDataHTML;
|
||||
dynamic resultDataTxt;
|
||||
|
||||
PatientLabSpecialResult(
|
||||
{this.invoiceNo,
|
||||
this.moduleID,
|
||||
this.resultData,
|
||||
this.resultDataHTML,
|
||||
this.resultDataTxt});
|
||||
|
||||
PatientLabSpecialResult.fromJson(Map<String, dynamic> json) {
|
||||
invoiceNo = json['InvoiceNo'];
|
||||
moduleID = json['ModuleID'];
|
||||
resultData = json['ResultData'];
|
||||
resultDataHTML = json['ResultDataHTML'];
|
||||
resultDataTxt = json['ResultDataTxt'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['InvoiceNo'] = this.invoiceNo;
|
||||
data['ModuleID'] = this.moduleID;
|
||||
data['ResultData'] = this.resultData;
|
||||
data['ResultDataHTML'] = this.resultDataHTML;
|
||||
data['ResultDataTxt'] = this.resultDataTxt;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
import 'package:hmg_patient_app_new/core/app_assets.dart';
|
||||
|
||||
enum AppointmentListingFilters{
|
||||
WALKIN("walkin", AppAssets.walkin_appointment_icon),
|
||||
BOOKED("booked", AppAssets.calendar),
|
||||
CONFIRMED("confirmed", AppAssets.calendar),
|
||||
ARRIVED("arrived", AppAssets.calendar),
|
||||
LIVECARE("livecare", AppAssets.small_livecare_icon),
|
||||
DATESELECTION("",AppAssets.calendar, trailingIcon: AppAssets.arrow_down);
|
||||
|
||||
final String labelText;
|
||||
final String leadingIcon;
|
||||
final String trailingIcon;
|
||||
|
||||
const AppointmentListingFilters(this.labelText, this.leadingIcon,
|
||||
{this.trailingIcon = ""});
|
||||
}
|
||||
@ -0,0 +1,83 @@
|
||||
class GetTamaraInstallmentsDetailsResponseModel {
|
||||
String? name;
|
||||
String? description;
|
||||
MinLimit? minLimit;
|
||||
MinLimit? maxLimit;
|
||||
List<SupportedInstalments>? supportedInstalments;
|
||||
|
||||
GetTamaraInstallmentsDetailsResponseModel({this.name, this.description, this.minLimit, this.maxLimit, this.supportedInstalments});
|
||||
|
||||
GetTamaraInstallmentsDetailsResponseModel.fromJson(Map<String, dynamic> json) {
|
||||
name = json['name'];
|
||||
description = json['description'];
|
||||
minLimit = json['minLimit'] != null ? new MinLimit.fromJson(json['minLimit']) : null;
|
||||
maxLimit = json['maxLimit'] != null ? new MinLimit.fromJson(json['maxLimit']) : null;
|
||||
if (json['supportedInstalments'] != null) {
|
||||
supportedInstalments = <SupportedInstalments>[];
|
||||
json['supportedInstalments'].forEach((v) {
|
||||
supportedInstalments!.add(new SupportedInstalments.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['name'] = this.name;
|
||||
data['description'] = this.description;
|
||||
if (this.minLimit != null) {
|
||||
data['minLimit'] = this.minLimit!.toJson();
|
||||
}
|
||||
if (this.maxLimit != null) {
|
||||
data['maxLimit'] = this.maxLimit!.toJson();
|
||||
}
|
||||
if (this.supportedInstalments != null) {
|
||||
data['supportedInstalments'] = this.supportedInstalments!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class MinLimit {
|
||||
String? currency;
|
||||
num? amount;
|
||||
|
||||
MinLimit({this.currency, this.amount});
|
||||
|
||||
MinLimit.fromJson(Map<String, dynamic> json) {
|
||||
currency = json['currency'];
|
||||
amount = json['amount'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['currency'] = this.currency;
|
||||
data['amount'] = this.amount;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class SupportedInstalments {
|
||||
int? instalments;
|
||||
MinLimit? minLimit;
|
||||
MinLimit? maxLimit;
|
||||
|
||||
SupportedInstalments({this.instalments, this.minLimit, this.maxLimit});
|
||||
|
||||
SupportedInstalments.fromJson(Map<String, dynamic> json) {
|
||||
instalments = json['instalments'];
|
||||
minLimit = json['minLimit'] != null ? new MinLimit.fromJson(json['minLimit']) : null;
|
||||
maxLimit = json['maxLimit'] != null ? new MinLimit.fromJson(json['maxLimit']) : null;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['instalments'] = this.instalments;
|
||||
if (this.minLimit != null) {
|
||||
data['minLimit'] = this.minLimit!.toJson();
|
||||
}
|
||||
if (this.maxLimit != null) {
|
||||
data['maxLimit'] = this.maxLimit!.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,48 @@
|
||||
import 'package:easy_localization/easy_localization.dart' show tr, StringTranslateExtension;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
|
||||
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
|
||||
import 'package:hmg_patient_app_new/features/my_appointments/models/appointemnet_filters.dart';
|
||||
import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart';
|
||||
import 'package:hmg_patient_app_new/theme/colors.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
|
||||
import 'package:smooth_corner/smooth_corner.dart';
|
||||
|
||||
class AppointmentFilters extends StatelessWidget {
|
||||
final AppointmentListingFilters item;
|
||||
final List<AppointmentListingFilters>? selectedFilter;
|
||||
final VoidCallback onClicked;
|
||||
|
||||
const AppointmentFilters(
|
||||
{super.key,
|
||||
required this.item,
|
||||
required this.onClicked,
|
||||
required this.selectedFilter});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppCustomChipWidget(
|
||||
backgroundColor: selectedFilter?.contains(item) == true?AppColors.chipSecondaryLightRedColor:AppColors.whiteColor,
|
||||
icon: item.leadingIcon,
|
||||
textColor: selectedFilter?.contains(item) == true
|
||||
? AppColors.chipPrimaryRedBorderColor: AppColors.blackColor,
|
||||
labelText: item.labelText.isNotEmpty?item.labelText.tr():"",
|
||||
iconHasColor: true,
|
||||
iconColor: selectedFilter?.contains(item) == true
|
||||
? AppColors.chipPrimaryRedBorderColor:AppColors.blackColor,
|
||||
iconSize: 16,
|
||||
deleteIcon: item.trailingIcon,
|
||||
labelPadding: EdgeInsetsDirectional.only(start: 8.h, end: 0.h),
|
||||
padding: EdgeInsets.symmetric(vertical: 12.h, horizontal: 8.h),
|
||||
deleteIconSize: Size(18.h, 18.h),
|
||||
shape: SmoothRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10 ),
|
||||
smoothness: 10,
|
||||
side: BorderSide(
|
||||
color: selectedFilter?.contains(item) == true
|
||||
? AppColors.chipPrimaryRedBorderColor
|
||||
: AppColors.borderGrayColor,
|
||||
width: 1),
|
||||
)).onPress(onClicked);
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,69 @@
|
||||
import 'package:easy_localization/easy_localization.dart'
|
||||
show tr, StringTranslateExtension;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_widget_from_html/flutter_widget_from_html.dart';
|
||||
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
|
||||
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
|
||||
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
|
||||
import 'package:hmg_patient_app_new/features/lab/lab_view_model.dart';
|
||||
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
|
||||
import 'package:hmg_patient_app_new/presentation/lab/lab_result_item_view.dart';
|
||||
import 'package:hmg_patient_app_new/presentation/lab/lab_result_via_hospital/LabResultList.dart';
|
||||
import 'package:hmg_patient_app_new/presentation/lab/lab_result_via_hospital/lab_order_specialResult.dart';
|
||||
import 'package:hmg_patient_app_new/theme/colors.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class LabResultByHospitals extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return CollapsingListView(
|
||||
title: LocaleKeys.labResults.tr(),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
spacing: 8.h,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Selector<LabViewModel, bool>(
|
||||
selector: (_, model) => model.isLabResultByHospitalLoading,
|
||||
builder: (_, isLoading, __) {
|
||||
if (isLoading) {
|
||||
return Column(
|
||||
children: [
|
||||
LabResultItemView(
|
||||
onTap: () {},
|
||||
labOrder: null,
|
||||
index: 0,
|
||||
isLoading: true,
|
||||
),
|
||||
LabResultItemView(
|
||||
onTap: () {},
|
||||
labOrder: null,
|
||||
index: 0,
|
||||
isLoading: true,
|
||||
),
|
||||
LabResultItemView(
|
||||
onTap: () {},
|
||||
labOrder: null,
|
||||
index: 0,
|
||||
isLoading: true,
|
||||
),
|
||||
LabResultItemView(
|
||||
onTap: () {},
|
||||
labOrder: null,
|
||||
index: 0,
|
||||
isLoading: true,
|
||||
),
|
||||
],
|
||||
);
|
||||
} else {
|
||||
return LabResultList();
|
||||
}
|
||||
},
|
||||
),
|
||||
LabOrderSpecialResult()
|
||||
],
|
||||
).paddingAll(24.h),
|
||||
));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hmg_patient_app_new/core/utils/utils.dart';
|
||||
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
|
||||
import 'package:hmg_patient_app_new/features/lab/lab_view_model.dart';
|
||||
import 'package:hmg_patient_app_new/features/lab/models/resp_models/lab_result.dart';
|
||||
import 'package:hmg_patient_app_new/presentation/lab/lab_result_via_hospital/lab_order_result_item.dart';
|
||||
import 'package:provider/provider.dart' show Selector, Provider, ReadContext;
|
||||
|
||||
class LabResultList extends StatelessWidget {
|
||||
late LabViewModel model;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
model = Provider.of<LabViewModel>(context);
|
||||
return Selector<LabViewModel, List<LabResult>>(
|
||||
selector: (_, model) => model.mainLabResultsByHospitals,
|
||||
builder: (__, list, ___) {
|
||||
if (list.isEmpty && context.read<LabViewModel>().labSpecialResult.isEmpty) {
|
||||
return Utils.getNoDataWidget(context,
|
||||
noDataText: "You don't have any lab results yet."
|
||||
.needTranslation);
|
||||
} else {
|
||||
return ListView.builder(
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
padding: EdgeInsets.zero,
|
||||
shrinkWrap: true,itemCount: list.length,itemBuilder: (____, index) {
|
||||
var labItem = list[index];
|
||||
return LabOrderResultItem(onTap: () {
|
||||
model.getPatientLabResult(model.currentlySelectedPatientOrder!, labItem.description ?? "", labItem.packageShortDescription!);
|
||||
},
|
||||
tests: labItem,
|
||||
index: index,
|
||||
iconColor: model.getColor(labItem.calculatedResultFlag ?? "N"),
|
||||
severityText: model.getSeverityText(labItem.calculatedResultFlag ?? "N"));
|
||||
});
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,132 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hmg_patient_app_new/core/app_assets.dart';
|
||||
import 'package:hmg_patient_app_new/core/app_export.dart';
|
||||
import 'package:hmg_patient_app_new/core/enums.dart';
|
||||
import 'package:hmg_patient_app_new/core/utils/date_util.dart';
|
||||
import 'package:hmg_patient_app_new/core/utils/utils.dart';
|
||||
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
|
||||
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
|
||||
import 'package:hmg_patient_app_new/features/lab/lab_view_model.dart' show LabViewModel;
|
||||
import 'package:hmg_patient_app_new/features/lab/models/resp_models/lab_result.dart';
|
||||
import 'package:hmg_patient_app_new/features/lab/models/resp_models/patient_lab_orders_response_model.dart';
|
||||
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
|
||||
import 'package:hmg_patient_app_new/theme/colors.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
|
||||
import 'package:hmg_patient_app_new/widgets/chip/custom_chip_widget.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class LabOrderResultItem extends StatelessWidget {
|
||||
final VoidCallback onTap;
|
||||
final int index;
|
||||
final LabResult? tests;
|
||||
final String severityText;
|
||||
final bool isLoading;
|
||||
final bool isExpanded;
|
||||
final Color iconColor;
|
||||
|
||||
const LabOrderResultItem({super.key, required this.onTap, this.tests, required this.index, this.isLoading = false, this.isExpanded = false,required this.iconColor, required this.severityText});
|
||||
|
||||
@override
|
||||
build(BuildContext context) {
|
||||
return AnimatedContainer(
|
||||
duration: Duration(milliseconds: 300),
|
||||
curve: Curves.easeInOut,
|
||||
margin: EdgeInsets.symmetric(vertical: 8.h),
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 20.h, hasShadow: true),
|
||||
child: Container(
|
||||
key: ValueKey<int>(index),
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.h, vertical: 16.h),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// ...labOrder!.testDetails!.map((detail) {
|
||||
Padding(
|
||||
padding: EdgeInsets.only(bottom: 8.h),
|
||||
child: '${tests!.description}'.toText14(weight: FontWeight.w500),
|
||||
),
|
||||
'${tests!.packageShortDescription}'.toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight),
|
||||
SizedBox(height: 12.h),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Flexible(
|
||||
child: Text(
|
||||
tests?.resultValue ?? "",
|
||||
style: TextStyle(
|
||||
fontSize: 24.fSize,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontFamily: 'Poppins',
|
||||
color: context.read<LabViewModel>().getColor(
|
||||
tests?.calculatedResultFlag ?? "",
|
||||
),
|
||||
letterSpacing: -2,
|
||||
),
|
||||
overflow: TextOverflow.ellipsis, // prevent overflow
|
||||
maxLines: 1,
|
||||
softWrap: false,
|
||||
),
|
||||
),
|
||||
SizedBox(width: 4.h,),
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Visibility(
|
||||
visible: tests?.referanceRange != null,
|
||||
child: Text(
|
||||
"(Reference range ${tests?.referanceRange})".needTranslation,
|
||||
style: TextStyle(
|
||||
fontSize: 12.fSize,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontFamily: 'Poppins',
|
||||
color: AppColors.greyTextColor,
|
||||
),
|
||||
// overflow: TextOverflow.ellipsis,
|
||||
// maxLines: 2,
|
||||
softWrap: true,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 12.h),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Column(
|
||||
spacing: 6.h,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
severityText.tr().toText10(weight: FontWeight.w500, color: AppColors.greyTextColor),
|
||||
Utils.buildSvgWithAssets(
|
||||
icon: AppAssets.lab_result_indicator,
|
||||
width: 21,
|
||||
height: 23,
|
||||
iconColor: iconColor
|
||||
),
|
||||
],
|
||||
),
|
||||
CustomButton(
|
||||
icon: AppAssets.view_report_icon,
|
||||
iconColor: AppColors.primaryRedColor,
|
||||
iconSize: 16.h,
|
||||
text: LocaleKeys.viewReport.tr(context: context),
|
||||
onPressed: () {
|
||||
onTap();
|
||||
},
|
||||
backgroundColor: AppColors.secondaryLightRedColor,
|
||||
borderColor: AppColors.secondaryLightRedColor,
|
||||
textColor: AppColors.primaryRedColor,
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
borderRadius: 12,
|
||||
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
|
||||
height: 40.h,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,120 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_widget_from_html/flutter_widget_from_html.dart';
|
||||
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
|
||||
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
|
||||
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
|
||||
import 'package:hmg_patient_app_new/features/lab/lab_view_model.dart';
|
||||
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
|
||||
import 'package:hmg_patient_app_new/theme/colors.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class LabOrderSpecialResult extends StatelessWidget {
|
||||
const LabOrderSpecialResult({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Selector<LabViewModel, bool>(
|
||||
selector: (_, model) => model.isSpecialResultsLoading,
|
||||
builder: (_, isLoading, __) {
|
||||
return Selector<LabViewModel, String>(
|
||||
selector: (_, model) => model.labSpecialResult,
|
||||
builder: (_, data, __) {
|
||||
if(isLoading){
|
||||
return Container(
|
||||
margin: EdgeInsets.symmetric(vertical: 8.h),
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 16.h, vertical: 16.h),
|
||||
width: MediaQuery.sizeOf(context).width - 24,
|
||||
decoration: RoundedRectangleBorder()
|
||||
.toSmoothCornerDecoration(
|
||||
color: AppColors.whiteColor,
|
||||
borderRadius: 20.h,
|
||||
hasShadow: true),
|
||||
child:Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
spacing: 12.h,
|
||||
children: [
|
||||
"loading".toText14().toShimmer2(isShow: isLoading),
|
||||
"loading".toText14().toShimmer2(isShow: isLoading),
|
||||
],
|
||||
)
|
||||
);
|
||||
}
|
||||
if(data.isNotEmpty ) {
|
||||
return AnimatedContainer(
|
||||
duration: Duration(milliseconds: 300),
|
||||
curve: Curves.easeInOut,
|
||||
margin: EdgeInsets.symmetric(vertical: 8.h),
|
||||
decoration: RoundedRectangleBorder()
|
||||
.toSmoothCornerDecoration(
|
||||
color: AppColors.whiteColor,
|
||||
borderRadius: 20.h,
|
||||
hasShadow: true),
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 16.h, vertical: 16.h),
|
||||
width: MediaQuery.sizeOf(context).width - 24,
|
||||
child: Column(
|
||||
spacing: 8.h,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// ...labOrder!.testDetails!.map((detail) {
|
||||
LocaleKeys.specialResult
|
||||
.tr()
|
||||
.toText14(weight: FontWeight.w500)
|
||||
.toShimmer2(isShow: isLoading),
|
||||
|
||||
data.isEmpty
|
||||
? LocaleKeys.noSpecialResult
|
||||
.tr()
|
||||
.toText12(
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColors.textColorLight)
|
||||
.toShimmer2(isShow: isLoading)
|
||||
: HtmlWidget(data).toShimmer2(isShow: isLoading)
|
||||
|
||||
//
|
||||
],
|
||||
),
|
||||
));
|
||||
} return SizedBox.shrink();
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/*Text(
|
||||
"Special Results",
|
||||
style: TextStyle(
|
||||
fontSize: 18.fSize,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColors.blackColor),
|
||||
),
|
||||
Container(
|
||||
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
||||
color: AppColors.whiteColor,
|
||||
borderRadius: 20.h,
|
||||
hasShadow: true
|
||||
),
|
||||
padding: EdgeInsets.all(16.h),
|
||||
width: MediaQuery.sizeOf(context).width-24,
|
||||
child: Selector<LabViewModel, bool>(
|
||||
selector: (_, model) =>
|
||||
model.isLabResultByHospitalLoading,
|
||||
builder: (_, isLoading, __) {
|
||||
return Selector<LabViewModel, String>(
|
||||
selector: (_, model) => model.labSpecialResult,
|
||||
builder: (_, data, __) {
|
||||
return (data.isEmpty)
|
||||
? Text("No result available".needTranslation,
|
||||
style: TextStyle(
|
||||
fontSize: 12.fSize,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColors.textColorLight))
|
||||
.toShimmer2(isShow: isLoading)
|
||||
: HtmlWidget(data)
|
||||
.toShimmer2(isShow: isLoading);
|
||||
});
|
||||
}))*/
|
||||
Loading…
Reference in New Issue