|
|
|
|
@ -4,6 +4,7 @@ import 'package:easy_localization/easy_localization.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:flutter_staggered_animations/flutter_staggered_animations.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/core/app_assets.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/size_utils.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/core/utils/utils.dart';
|
|
|
|
|
@ -15,6 +16,7 @@ import 'package:hmg_patient_app_new/features/lab/lab_view_model.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/presentation/lab/search_lab_report.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/custom_chip_widget.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/shimmer/movies_shimmer_widget.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
@ -30,7 +32,7 @@ class _LabOrdersPageState extends State<LabOrdersPage> {
|
|
|
|
|
late LabViewModel labProvider;
|
|
|
|
|
List<List<TestDetails>?> labSuggestions = [];
|
|
|
|
|
int? expandedIndex;
|
|
|
|
|
|
|
|
|
|
String? selectedFilterText='';
|
|
|
|
|
@override
|
|
|
|
|
void initState() {
|
|
|
|
|
scheduleMicrotask(() {
|
|
|
|
|
@ -66,7 +68,10 @@ class _LabOrdersPageState extends State<LabOrdersPage> {
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
|
|
showCommonBottomSheet(context, child: SearchLabResultsContent(labSuggestionsList: model.labSuggestions),
|
|
|
|
|
callBackFunc: () {},
|
|
|
|
|
callBackFunc: (value) {
|
|
|
|
|
selectedFilterText = value;
|
|
|
|
|
model.filterLabReports(value!);
|
|
|
|
|
},
|
|
|
|
|
title: LocaleKeys.searchLabReport.tr(),
|
|
|
|
|
height: ResponsiveExtension.screenHeight,
|
|
|
|
|
isCloseButtonVisible: true);
|
|
|
|
|
@ -77,6 +82,8 @@ class _LabOrdersPageState extends State<LabOrdersPage> {
|
|
|
|
|
// Build Tab Bar
|
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
// Expandable list
|
|
|
|
|
|
|
|
|
|
selectedFilterText!.isNotEmpty ? CustomChipWidget(chipText: selectedFilterText!, chipType: ChipTypeEnum.alert, isSelected: true, ) : SizedBox(),
|
|
|
|
|
ListView.builder(
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
|
@ -275,13 +282,6 @@ class _LabOrdersPageState extends State<LabOrdersPage> {
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
getLabSuggestions(LabViewModel model) {
|
|
|
|
|
if(model.patientLabOrders.isEmpty){
|
|
|
|
|
return [];
|
|
|
|
|
}
|
|
|
|
|
return model.patientLabOrders.map((m) => m.testDetails).toList();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|