Prescription delivery implementation contd.

pull/101/head
haroon amjad 5 months ago
parent 07a3052b8e
commit eb9c38729b

@ -754,7 +754,7 @@ class ApiConsts {
TAMARA_URL = "https://epharmacy.hmg.com/tamara/Home/Checkout"; TAMARA_URL = "https://epharmacy.hmg.com/tamara/Home/Checkout";
GET_TAMARA_INSTALLMENTS_URL = "https://epharmacy.hmg.com/tamara/Home/getinstallments"; GET_TAMARA_INSTALLMENTS_URL = "https://epharmacy.hmg.com/tamara/Home/getinstallments";
GET_TAMARA_PAYMENT_STATUS = 'https://epharmacy.hmg.com/tamara/api/OnlineTamara/order_status?orderid='; GET_TAMARA_PAYMENT_STATUS = 'https://epharmacy.hmg.com/tamara/api/OnlineTamara/order_status?orderid=';
rcBaseUrl = 'https://rc.hmg.com/'; rcBaseUrl = 'https://rc.hmg.com/uat/';
break; break;
case AppEnvironmentTypeEnum.uat: case AppEnvironmentTypeEnum.uat:
baseUrl = "https://uat.hmgwebservices.com/"; baseUrl = "https://uat.hmgwebservices.com/";
@ -764,7 +764,7 @@ class ApiConsts {
TAMARA_URL = "https://epharmacy.hmg.com/tamara/Home/Checkout"; TAMARA_URL = "https://epharmacy.hmg.com/tamara/Home/Checkout";
GET_TAMARA_INSTALLMENTS_URL = "https://epharmacy.hmg.com/tamara/Home/getinstallments"; GET_TAMARA_INSTALLMENTS_URL = "https://epharmacy.hmg.com/tamara/Home/getinstallments";
GET_TAMARA_PAYMENT_STATUS = 'https://epharmacy.hmg.com/tamara/api/OnlineTamara/order_status?orderid='; GET_TAMARA_PAYMENT_STATUS = 'https://epharmacy.hmg.com/tamara/api/OnlineTamara/order_status?orderid=';
rcBaseUrl = 'https://rc.hmg.com/'; rcBaseUrl = 'https://rc.hmg.com/uat/';
break; break;
case AppEnvironmentTypeEnum.preProd: case AppEnvironmentTypeEnum.preProd:
baseUrl = "https://webservices.hmg.com/"; baseUrl = "https://webservices.hmg.com/";
@ -784,7 +784,7 @@ class ApiConsts {
TAMARA_URL = "https://epharmacy.hmg.com/tamara/Home/Checkout"; TAMARA_URL = "https://epharmacy.hmg.com/tamara/Home/Checkout";
GET_TAMARA_INSTALLMENTS_URL = "https://epharmacy.hmg.com/tamara/Home/getinstallments"; GET_TAMARA_INSTALLMENTS_URL = "https://epharmacy.hmg.com/tamara/Home/getinstallments";
GET_TAMARA_PAYMENT_STATUS = 'https://epharmacy.hmg.com/tamara/api/OnlineTamara/order_status?orderid='; GET_TAMARA_PAYMENT_STATUS = 'https://epharmacy.hmg.com/tamara/api/OnlineTamara/order_status?orderid=';
rcBaseUrl = 'https://rc.hmg.com/'; rcBaseUrl = 'https://rc.hmg.com/uat/';
break; break;
case AppEnvironmentTypeEnum.staging: case AppEnvironmentTypeEnum.staging:
baseUrl = "https://uat.hmgwebservices.com/"; baseUrl = "https://uat.hmgwebservices.com/";
@ -794,7 +794,7 @@ class ApiConsts {
TAMARA_URL = "https://epharmacy.hmg.com/tamara/Home/Checkout"; TAMARA_URL = "https://epharmacy.hmg.com/tamara/Home/Checkout";
GET_TAMARA_INSTALLMENTS_URL = "https://epharmacy.hmg.com/tamara/Home/getinstallments"; GET_TAMARA_INSTALLMENTS_URL = "https://epharmacy.hmg.com/tamara/Home/getinstallments";
GET_TAMARA_PAYMENT_STATUS = 'https://epharmacy.hmg.com/tamara/api/OnlineTamara/order_status?orderid='; GET_TAMARA_PAYMENT_STATUS = 'https://epharmacy.hmg.com/tamara/api/OnlineTamara/order_status?orderid=';
rcBaseUrl = 'https://rc.hmg.com/'; rcBaseUrl = 'https://rc.hmg.com/uat/';
break; break;
} }
} }

@ -61,10 +61,10 @@ class RrtMapScreen extends StatelessWidget {
BottomSheetType.EXPANDED: ExpanedBottomSheet(context), BottomSheetType.EXPANDED: ExpanedBottomSheet(context),
BottomSheetType.FIXED: FixedBottomSheet(context), BottomSheetType.FIXED: FixedBottomSheet(context),
}, },
).paddingAll(16.h), ),
body: Stack( body: Stack(
children: [ children: [
if (context.read<EmergencyServicesViewModel>().isGMSAvailable ) if (context.read<EmergencyServicesViewModel>().isGMSAvailable)
GMSMap( GMSMap(
currentLocation: currentLocation:
context.read<EmergencyServicesViewModel>().getGMSLocation(), context.read<EmergencyServicesViewModel>().getGMSLocation(),
@ -116,15 +116,13 @@ class RrtMapScreen extends StatelessWidget {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
spacing: 24.h, spacing: 24.h,
children: [ children: [
inputFields(context), inputFields(context).paddingSymmetrical(16.h, 0.h),
SizedBox( SizedBox(
height: 200.h,
child: DecoratedBox( child: DecoratedBox(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.scaffoldBgColor, color: AppColors.scaffoldBgColor,
@ -140,16 +138,14 @@ class RrtMapScreen extends StatelessWidget {
Column( Column(
spacing: 4.h, spacing: 4.h,
children: [ children: [
"Select Pickup Details".needTranslation.toText21( "Select Location".needTranslation.toText21(
weight: FontWeight.w600, weight: FontWeight.w600,
color: AppColors.textColor, color: AppColors.textColor,
), ),
" Please select the details of pickup" "Please select the location".needTranslation.toText12(
.needTranslation fontWeight: FontWeight.w500,
.toText12( color: AppColors.greyTextColor,
fontWeight: FontWeight.w500, )
color: AppColors.greyTextColor,
)
], ],
), ),
CustomButton( CustomButton(
@ -160,7 +156,8 @@ class RrtMapScreen extends StatelessWidget {
PlaceDetails? placeDetails = locationViewModel.placeDetails; PlaceDetails? placeDetails = locationViewModel.placeDetails;
PlacePrediction? placePrediction = locationViewModel.selectedPrediction; PlacePrediction? placePrediction = locationViewModel.selectedPrediction;
context.read<EmergencyServicesViewModel>().submitRRTRequest(response?.results.first, placeDetails, placePrediction); context.read<EmergencyServicesViewModel>().submitRRTRequest(response?.results.first, placeDetails, placePrediction);
}) },
)
], ],
).paddingOnly(top: 24.h, bottom: 32.h, left: 24.h, right: 24.h), ).paddingOnly(top: 24.h, bottom: 32.h, left: 24.h, right: 24.h),
), ),
@ -561,7 +558,7 @@ class RrtMapScreen extends StatelessWidget {
} }
///decide which field to show first based on the selected calling place ///decide which field to show first based on the selected calling place
inputFields(BuildContext context) { Widget inputFields(BuildContext context) {
return textPlaceInput(context); return textPlaceInput(context);
} }

@ -255,7 +255,7 @@ class _PrescriptionsListPageState extends State<PrescriptionsListPage> {
Expanded( Expanded(
flex: 1, flex: 1,
child: Container( child: Container(
height: 48.h, height: 40.h,
width: 40.w, width: 40.w,
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.textColor, color: AppColors.textColor,
@ -268,8 +268,6 @@ class _PrescriptionsListPageState extends State<PrescriptionsListPage> {
child: Utils.buildSvgWithAssets( child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon_small, icon: AppAssets.forward_arrow_icon_small,
iconColor: AppColors.whiteColor, iconColor: AppColors.whiteColor,
// width: 8.w,
// height: 2,
fit: BoxFit.contain, fit: BoxFit.contain,
), ),
), ),

@ -4,6 +4,8 @@ import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.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/app_export.dart';
import 'package:hmg_patient_app_new/core/utils/utils.dart'; import 'package:hmg_patient_app_new/core/utils/utils.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:huawei_map/huawei_map.dart' ; import 'package:huawei_map/huawei_map.dart' ;
class HMSMap extends StatefulWidget{ class HMSMap extends StatefulWidget{
@ -55,7 +57,7 @@ class _HMSMapState extends State<HMSMap> {
visible: widget.showCenterMarker, visible: widget.showCenterMarker,
child: Align( child: Align(
alignment: Alignment.center, alignment: Alignment.center,
child: Utils.buildSvgWithAssets(icon: AppAssets.pin_location, width: 24.w, height: 36.h), child: Icon(Icons.location_pin, size: 36.h, color: AppColors.primaryRedColor).paddingOnly(bottom: 24.h),
), ),
) )
], ],

@ -5,6 +5,8 @@ import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:hmg_patient_app_new/core/app_assets.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/size_utils.dart';
import 'package:hmg_patient_app_new/core/utils/utils.dart'; import 'package:hmg_patient_app_new/core/utils/utils.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
class GMSMap extends StatelessWidget{ class GMSMap extends StatelessWidget{
Completer<GoogleMapController>? controller; Completer<GoogleMapController>? controller;
@ -29,14 +31,15 @@ class GMSMap extends StatelessWidget{
children: [ children: [
GoogleMap( GoogleMap(
mapType: mapType, mapType: mapType,
zoomControlsEnabled: false, zoomControlsEnabled: true,
myLocationEnabled: myLocationEnabled, myLocationEnabled: myLocationEnabled,
myLocationButtonEnabled: false, myLocationButtonEnabled: false,
compassEnabled: compassEnabled, compassEnabled: compassEnabled,
initialCameraPosition: currentLocation, initialCameraPosition: currentLocation,
onCameraMove: (value) => onCameraMoved(value), onCameraMove: (value) => onCameraMoved(value),
onCameraIdle: ()=>onCameraIdle(), onCameraIdle: ()=>onCameraIdle(),
onMapCreated: (GoogleMapController controller) { // padding: EdgeInsets.only(bottom: 300.h),
onMapCreated: (GoogleMapController controller) {
this.controller?.complete(controller); this.controller?.complete(controller);
}, },
), ),
@ -44,10 +47,10 @@ class GMSMap extends StatelessWidget{
visible: showCenterMarker, visible: showCenterMarker,
child: Align( child: Align(
alignment: Alignment.center, alignment: Alignment.center,
child: Utils.buildSvgWithAssets(icon: AppAssets.pin_location, width: 24.w, height: 36.h), child: Icon(Icons.location_pin, size: 36.h, color: AppColors.primaryRedColor).paddingOnly(bottom: 24.h),
), ),
) )
], ],
); );
} }
} }
Loading…
Cancel
Save