|
|
|
|
@ -1,14 +1,21 @@
|
|
|
|
|
import 'dart:async';
|
|
|
|
|
|
|
|
|
|
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/utils/size_utils.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/core/utils/utils.dart' show Utils;
|
|
|
|
|
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/book_appointments/book_appointments_view_model.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/features/my_appointments/appointment_via_region_viewmodel.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/presentation/appointments/widgets/region_bottomsheet/region_list_item.dart' show RegionListItem;
|
|
|
|
|
import 'package:hmg_patient_app_new/theme/colors.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
|
|
|
|
|
import 'package:lottie/lottie.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
|
|
|
|
|
|
import '../../../../widgets/common_bottom_sheet.dart';
|
|
|
|
|
|
|
|
|
|
@ -31,13 +38,52 @@ class _RegionBottomSheetBodyState extends State<RegionBottomSheetBody> {
|
|
|
|
|
} else if (regionalViewModel.regionBottomSheetType == RegionBottomSheetType.FOR_CLINIIC) {
|
|
|
|
|
myAppointmentsViewModel.getMappedDoctors(onError: (err) {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
showCommonBottomSheetWithoutHeight(
|
|
|
|
|
context,
|
|
|
|
|
child: Utils.getErrorWidget(loadingText: err),
|
|
|
|
|
callBackFunc: () {},
|
|
|
|
|
isFullScreen: false,
|
|
|
|
|
isCloseButtonVisible: true,
|
|
|
|
|
);
|
|
|
|
|
if (myAppointmentsViewModel.selectedClinic.clinicID == 23) {
|
|
|
|
|
showCommonBottomSheetWithoutHeight(
|
|
|
|
|
context,
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
Lottie.asset(AppAnimations.errorAnimation, repeat: true, reverse: false, frameRate: FrameRate(60), width: 100.h, height: 100.h, fit: BoxFit.fill),
|
|
|
|
|
SizedBox(height: 8.h),
|
|
|
|
|
("For booking appointments in the Physiotherapy clinic, please contact: 920066666").toText16(color: AppColors.blackColor),
|
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
CustomButton(
|
|
|
|
|
height: 40.h,
|
|
|
|
|
backgroundColor: AppColors.primaryRedColor,
|
|
|
|
|
borderColor: AppColors.primaryRedColor,
|
|
|
|
|
text: LocaleKeys.callNow.tr(),
|
|
|
|
|
textColor: AppColors.whiteColor,
|
|
|
|
|
iconColor: AppColors.whiteColor,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
launchUrl(
|
|
|
|
|
Uri.parse("tel://920066666"),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
icon: AppAssets.call),
|
|
|
|
|
],
|
|
|
|
|
).center,
|
|
|
|
|
callBackFunc: () {},
|
|
|
|
|
isFullScreen: false,
|
|
|
|
|
isCloseButtonVisible: true,
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
showCommonBottomSheetWithoutHeight(
|
|
|
|
|
context,
|
|
|
|
|
child: Utils.getErrorWidget(loadingText: err),
|
|
|
|
|
callBackFunc: () {},
|
|
|
|
|
isFullScreen: false,
|
|
|
|
|
isCloseButtonVisible: true,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
// showCommonBottomSheetWithoutHeight(
|
|
|
|
|
// context,
|
|
|
|
|
// child: Utils.getErrorWidget(loadingText: err),
|
|
|
|
|
// callBackFunc: () {},
|
|
|
|
|
// isFullScreen: false,
|
|
|
|
|
// isCloseButtonVisible: true,
|
|
|
|
|
// );
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|