merge-update-with-lab-changes
devamirsaleemahmad 2 years ago
parent cbc38940ea
commit 8f591654a5

@ -173,7 +173,7 @@ class BaseAppClient {
onFailure!('Error While Fetching data', statusCode); onFailure!('Error While Fetching data', statusCode);
logApiEndpointError(endPoint, 'Error While Fetching data', statusCode); logApiEndpointError(endPoint, 'Error While Fetching data', statusCode);
} else { } else {
var decoded = utf8.decode(response.bodyBytes); // var decoded = utf8.decode(response.bodyBytes);
var parsed = json.decode(utf8.decode(response.bodyBytes)); var parsed = json.decode(utf8.decode(response.bodyBytes));
// print("Response: $parsed"); // print("Response: $parsed");

@ -20,25 +20,21 @@ class AmRequestViewModel extends BaseViewModel {
HospitalService _hospitalService = locator<HospitalService>(); HospitalService _hospitalService = locator<HospitalService>();
MedicalService _medicalService = locator<MedicalService>(); MedicalService _medicalService = locator<MedicalService>();
List<PatientERTransportationMethod> get amRequestModeList => List<PatientERTransportationMethod> get amRequestModeList => _amService.amModelList;
_amService.amModelList;
List<PatientAllPresOrders> get patientAllPresOrdersList => List<PatientAllPresOrders> get patientAllPresOrdersList => _amService.patientAllPresOrdersList;
_amService.patientAllPresOrdersList;
List<AppoitmentAllHistoryResultList> get appoitmentAllHistoryResultList => List<AppoitmentAllHistoryResultList> get appoitmentAllHistoryResultList => _medicalService.appoitmentAllHistoryResultList;
_medicalService.appoitmentAllHistoryResultList;
List<AmbulanceRequestOrdersModel> get patientAmbulanceRequestOrdersList => List<AmbulanceRequestOrdersModel> get patientAmbulanceRequestOrdersList => _amService.patientAmbulanceRequestOrdersList;
_amService.patientAmbulanceRequestOrdersList;
List<HospitalsModel> get hospitals => _hospitalService.hospitals; List<HospitalsModel> get hospitals => _hospitalService.hospitals;
bool get hasPendingOrder => _amService.hasPendingOrder; bool get hasPendingOrder => _amService.hasPendingOrder;
PickUpRequestPresOrder get pickUpRequestPresOrder =>_amService.pickUpRequestPresOrder!; PickUpRequestPresOrder? get pickUpRequestPresOrder => _amService.pickUpRequestPresOrder;
AmbulanceRequestOrdersModel get pendingAmbulanceRequestOrder =>_amService.pendingAmbulanceRequestOrder!; AmbulanceRequestOrdersModel? get pendingAmbulanceRequestOrder => _amService.pendingAmbulanceRequestOrder;
Future getAppointmentHistory() async { Future getAppointmentHistory() async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);

@ -20,28 +20,21 @@ class PharmacyCategoriseViewModel extends BaseViewModel {
List<PharmacyProduct> filteredInPatientItems = []; List<PharmacyProduct> filteredInPatientItems = [];
List<PharmacyProduct> filteredMyInPatientItems = []; List<PharmacyProduct> filteredMyInPatientItems = [];
PharmacyCategoriseService _pharmacyCategoriseService = PharmacyCategoriseService _pharmacyCategoriseService = locator<PharmacyCategoriseService>();
locator<PharmacyCategoriseService>();
List<PharmacyCategorise> get categorise => List<PharmacyCategorise> get categorise => _pharmacyCategoriseService.categoriseList;
_pharmacyCategoriseService.categoriseList;
List<CategoriseParentModel> get categoriseParent => List<CategoriseParentModel> get categoriseParent => _pharmacyCategoriseService.parentCategoriseList;
_pharmacyCategoriseService.parentCategoriseList;
List<PharmacyProduct> get parentProducts => List<PharmacyProduct> get parentProducts => _pharmacyCategoriseService.parentProductsList;
_pharmacyCategoriseService.parentProductsList;
List<CategoriseParentModel> get subCategorise => List<CategoriseParentModel> get subCategorise => _pharmacyCategoriseService.subCategoriseList;
_pharmacyCategoriseService.subCategoriseList;
List<PharmacyProduct> get subProducts => List<PharmacyProduct> get subProducts => _pharmacyCategoriseService.subProductsList;
_pharmacyCategoriseService.subProductsList;
List<PharmacyProduct> get finalProducts => List<PharmacyProduct> get finalProducts => _pharmacyCategoriseService.finalProducts;
_pharmacyCategoriseService.finalProducts;
List<CategoriseParentModel> get brandsList => List<CategoriseParentModel> get brandsList => _pharmacyCategoriseService.brandsList;
_pharmacyCategoriseService.brandsList;
List<PharmacyProduct> get searchList => _pharmacyCategoriseService.searchList; List<PharmacyProduct> get searchList => _pharmacyCategoriseService.searchList;
@ -99,8 +92,7 @@ class PharmacyCategoriseViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future getCategoriseParent( Future getCategoriseParent({String? i, int? pageIndex, bool? isLoading, BuildContext? context}) async {
{String? i, int? pageIndex, bool? isLoading, BuildContext? context}) async {
hasError = false; hasError = false;
// _insuranceCardService.clearInsuranceCard(); // _insuranceCardService.clearInsuranceCard();
setState(ViewState.Busy); setState(ViewState.Busy);
@ -111,19 +103,16 @@ class PharmacyCategoriseViewModel extends BaseViewModel {
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else } else
await getBrands(id: i); await getBrands(id: i);
await getParentProducts( await getParentProducts(i: i, pageIndex: pageIndex, isLoading: isLoading, context: context);
i: i, pageIndex: pageIndex, isLoading: isLoading, context: context);
// GifLoaderDialogUtils.showMyDialog(context); // GifLoaderDialogUtils.showMyDialog(context);
} }
Future getParentProducts( Future getParentProducts({String? i, int? pageIndex, bool? isLoading, BuildContext? context}) async {
{String? i, int? pageIndex, bool? isLoading, BuildContext? context}) async {
hasError = false; hasError = false;
// _insuranceCardService.clearInsuranceCard(); // _insuranceCardService.clearInsuranceCard();
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
GifLoaderDialogUtils.showMyDialog(context!); GifLoaderDialogUtils.showMyDialog(context!);
await _pharmacyCategoriseService.getParentProducts( await _pharmacyCategoriseService.getParentProducts(id: i, pageNumber: pageIndex, isLoading: isLoading!);
id: i, pageNumber: pageIndex, isLoading: isLoading!);
if (_pharmacyCategoriseService.hasError) { if (_pharmacyCategoriseService.hasError) {
error = _pharmacyCategoriseService.error!; error = _pharmacyCategoriseService.error!;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
@ -132,11 +121,7 @@ class PharmacyCategoriseViewModel extends BaseViewModel {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
} }
Future getSubCategorise( Future getSubCategorise({String? i, int? pageIndex, bool isLoading = false, BuildContext? context}) async {
{String? i,
int? pageIndex,
bool isLoading = false,
BuildContext? context}) async {
hasError = false; hasError = false;
// _insuranceCardService.clearInsuranceCard(); // _insuranceCardService.clearInsuranceCard();
setState(ViewState.Busy); setState(ViewState.Busy);
@ -147,21 +132,15 @@ class PharmacyCategoriseViewModel extends BaseViewModel {
error = _pharmacyCategoriseService.error!; error = _pharmacyCategoriseService.error!;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else } else
getSubProducts( getSubProducts(i: i, pageIndex: pageIndex, isLoading: isLoading, context: context);
i: i, pageIndex: pageIndex, isLoading: isLoading, context: context);
} }
Future getSubProducts( Future getSubProducts({String? i, int? pageIndex, bool isLoading = false, BuildContext? context}) async {
{String? i,
int? pageIndex,
bool isLoading = false,
BuildContext? context}) async {
hasError = false; hasError = false;
// _insuranceCardService.clearInsuranceCard(); // _insuranceCardService.clearInsuranceCard();
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
GifLoaderDialogUtils.showMyDialog(context!); GifLoaderDialogUtils.showMyDialog(context!);
await _pharmacyCategoriseService.getSubProducts( await _pharmacyCategoriseService.getSubProducts(id: i, pageIndex: pageIndex, isLoading: isLoading);
id: i, pageIndex: pageIndex, isLoading: isLoading);
if (_pharmacyCategoriseService.hasError) { if (_pharmacyCategoriseService.hasError) {
error = _pharmacyCategoriseService.error!; error = _pharmacyCategoriseService.error!;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
@ -182,13 +161,11 @@ class PharmacyCategoriseViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future getFilteredProducts( Future getFilteredProducts({String? categoryId, String? brandId, String? min, String? max}) async {
{String? categoryId, String? brandId, String? min, String? max}) async {
hasError = false; hasError = false;
// _insuranceCardService.clearInsuranceCard(); // _insuranceCardService.clearInsuranceCard();
setState(ViewState.Busy); setState(ViewState.Busy);
await _pharmacyCategoriseService.getFilteredProducts( await _pharmacyCategoriseService.getFilteredProducts(categoryId: categoryId, brandId: brandId, max: max, min: min);
categoryId: categoryId, brandId: brandId, max: max, min: min);
if (_pharmacyCategoriseService.hasError) { if (_pharmacyCategoriseService.hasError) {
error = _pharmacyCategoriseService.error!; error = _pharmacyCategoriseService.error!;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
@ -196,13 +173,11 @@ class PharmacyCategoriseViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future getFilteredSubProducts( Future getFilteredSubProducts({String? categoryId, String? brandId, String? min, String? max}) async {
{String? categoryId, String? brandId, String? min, String? max}) async {
hasError = false; hasError = false;
// _insuranceCardService.clearInsuranceCard(); // _insuranceCardService.clearInsuranceCard();
setState(ViewState.Busy); setState(ViewState.Busy);
await _pharmacyCategoriseService.getFilteredSubProducts( await _pharmacyCategoriseService.getFilteredSubProducts(categoryId: categoryId, brandId: brandId, max: max, min: min);
categoryId: categoryId, brandId: brandId, max: max, min: min);
if (_pharmacyCategoriseService.hasError) { if (_pharmacyCategoriseService.hasError) {
error = _pharmacyCategoriseService.error!; error = _pharmacyCategoriseService.error!;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
@ -267,16 +242,9 @@ class PharmacyCategoriseViewModel extends BaseViewModel {
addOnFilteredList() { addOnFilteredList() {
if (lastSubsetIndex < parentProducts.length) { if (lastSubsetIndex < parentProducts.length) {
firstSubsetIndex = firstSubsetIndex + firstSubsetIndex = firstSubsetIndex + (parentProducts.length - lastSubsetIndex < inPatientPageSize - 1 ? parentProducts.length - lastSubsetIndex : inPatientPageSize - 1);
(parentProducts.length - lastSubsetIndex < inPatientPageSize - 1 lastSubsetIndex = lastSubsetIndex + (parentProducts.length - lastSubsetIndex < inPatientPageSize - 1 ? parentProducts.length - lastSubsetIndex : inPatientPageSize - 1);
? parentProducts.length - lastSubsetIndex filteredInPatientItems.addAll(parentProducts.sublist(firstSubsetIndex, lastSubsetIndex));
: inPatientPageSize - 1);
lastSubsetIndex = lastSubsetIndex +
(parentProducts.length - lastSubsetIndex < inPatientPageSize - 1
? parentProducts.length - lastSubsetIndex
: inPatientPageSize - 1);
filteredInPatientItems
.addAll(parentProducts.sublist(firstSubsetIndex, lastSubsetIndex));
setState(ViewState.Idle); setState(ViewState.Idle);
} }
} }

@ -48,7 +48,7 @@ class SelectDeviceIMEIRES {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = Map<String, dynamic>();
data['BiometricEnabled'] = this.biometricEnabled; data['BiometricEnabled'] = this.biometricEnabled;
data['CreatedOn'] = this.createdOn; data['CreatedOn'] = this.createdOn;
data['EditedOn'] = this.editedOn; data['EditedOn'] = this.editedOn;

@ -15,9 +15,9 @@ class LocationDetails {
_long = long; _long = long;
} }
String get formattedAddress => _formattedAddress!; String? get formattedAddress => _formattedAddress;
set formattedAddress(String formattedAddress) { set formattedAddress(String? formattedAddress) {
_formattedAddress = formattedAddress; _formattedAddress = formattedAddress;
} }
} }

@ -2,6 +2,7 @@ import 'dart:convert';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/main.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart'; import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
@ -213,7 +214,7 @@ class _BookConfirmState extends State<BookConfirm> {
elevation: 0, elevation: 0,
onPressed: () async { onPressed: () async {
bool isLiveCareSchedule = await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT) ?? false; bool isLiveCareSchedule = await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT) ?? false;
if (isLiveCareSchedule != null && isLiveCareSchedule) { if (isLiveCareSchedule) {
insertLiveCareScheduledAppointment(context, widget.doctor); insertLiveCareScheduledAppointment(context, widget.doctor);
} else { } else {
insertAppointment(context, widget.doctor, widget.initialSlotDuration); insertAppointment(context, widget.doctor, widget.initialSlotDuration);
@ -273,7 +274,7 @@ class _BookConfirmState extends State<BookConfirm> {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {
print(err); logger.d(err);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
}); });
} }
@ -372,9 +373,9 @@ class _BookConfirmState extends State<BookConfirm> {
dialog.showAlertDialog(context); dialog.showAlertDialog(context);
} }
}).catchError((err) { }).catchError((err) {
logger.d(err);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);
print(err);
}); });
projectViewModel.analytics.appointment.book_appointment_click_confirm(appointment_type: 'regular', dateTime: timeSlot!, doctor: widget.doctor); projectViewModel.analytics.appointment.book_appointment_click_confirm(appointment_type: 'regular', dateTime: timeSlot!, doctor: widget.doctor);
} }

@ -336,6 +336,7 @@ class _DoctorProfileState extends State<DoctorProfile> with TickerProviderStateM
child: RatingBar( child: RatingBar(
itemSize: 20.0, itemSize: 20.0,
allowHalfRating: true, allowHalfRating: true,
ignoreGestures: true,
initialRating: this.widget.doctor.actualDoctorRate!.toDouble(), initialRating: this.widget.doctor.actualDoctorRate!.toDouble(),
ratingWidget: RatingWidget( ratingWidget: RatingWidget(
full: Icon( full: Icon(

@ -40,9 +40,9 @@ class SearchByClinic extends StatefulWidget {
class _SearchByClinicState extends State<SearchByClinic> { class _SearchByClinicState extends State<SearchByClinic> {
bool nearestAppo = false; bool nearestAppo = false;
String dropdownValue = ""; String? dropdownValue;
String dropdownTitle = ""; String dropdownTitle = "";
String projectDropdownValue = ""; String? projectDropdownValue;
// var event = RobotProvider(); // var event = RobotProvider();
List<ListClinicCentralized> clinicsList = []; List<ListClinicCentralized> clinicsList = [];
@ -51,8 +51,8 @@ class _SearchByClinicState extends State<SearchByClinic> {
bool isLoaded = false; bool isLoaded = false;
bool isProjectLoaded = false; bool isProjectLoaded = false;
ListClinicCentralized selectedClinic = ListClinicCentralized(); ListClinicCentralized? selectedClinic;
HospitalsModel selectedHospital = HospitalsModel(); HospitalsModel? selectedHospital;
AuthenticatedUser authUser = new AuthenticatedUser(); AuthenticatedUser authUser = new AuthenticatedUser();
AuthProvider authProvider = new AuthProvider(); AuthProvider authProvider = new AuthProvider();
@ -78,7 +78,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
if (projectViewModel.isLogin) { if (projectViewModel.isLogin) {
if (radioValue == null) { if (radioValue == null) {
if (projectViewModel.user!.gender == 1) { if (projectViewModel.user.gender == 1) {
radioValue = TranslationBase.of(context).male; radioValue = TranslationBase.of(context).male;
} else { } else {
radioValue = TranslationBase.of(context).female; radioValue = TranslationBase.of(context).female;
@ -317,26 +317,26 @@ class _SearchByClinicState extends State<SearchByClinic> {
child: DropdownButtonHideUnderline( child: DropdownButtonHideUnderline(
child: DropdownButton<HospitalsModel>( child: DropdownButton<HospitalsModel>(
key: projectDropdownKey, key: projectDropdownKey,
hint: new Text(TranslationBase.of(context).selectHospital), hint: Text(TranslationBase.of(context).selectHospital),
value: selectedHospital, value: selectedHospital,
iconSize: 0, iconSize: 0,
isExpanded: true, isExpanded: true,
style: TextStyle(fontSize: 14, letterSpacing: -0.56, color: Colors.black), style: TextStyle(fontSize: 14, letterSpacing: -0.56, color: Colors.black),
items: projectsList.map((item) { items: projectsList.map((HospitalsModel item) {
return DropdownMenuItem<HospitalsModel>( return DropdownMenuItem<HospitalsModel>(
value: item, value: item,
child: Text(item.name!), child: Text('${item.name!}'),
); );
}).toList(), }).toList(),
onChanged: (newValue) async { onChanged: (HospitalsModel? newValue) async {
setState(() { setState(() {
selectedHospital = HospitalsModel.fromJson(newValue!.toJson()); HospitalsModel tempselectedHospital = new HospitalsModel.fromJson(newValue!.toJson());
projectDropdownValue = newValue.mainProjectID.toString(); projectDropdownValue = newValue.mainProjectID.toString();
if (dropdownValue.split("-")[0] == "253") { if (dropdownValue!.split("-")[0] == "253") {
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
page: LaserClinic(selectedHospital: selectedHospital), page: LaserClinic(selectedHospital: tempselectedHospital!),
), ),
); );
} else { } else {
@ -489,7 +489,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
bool isDentalSelectedAndSupported() { bool isDentalSelectedAndSupported() {
if (dropdownValue != null) if (dropdownValue != null)
return dropdownValue != "" && (dropdownValue.split("-")[0] == "17" || dropdownValue.split("-")[0] == "253") && isMobileAppDentalAllow; return dropdownValue != "" && (dropdownValue!.split("-")[0] == "17" || dropdownValue!.split("-")[0] == "253") && isMobileAppDentalAllow;
else else
return false; return false;
} }
@ -555,15 +555,15 @@ class _SearchByClinicState extends State<SearchByClinic> {
// TODO Mosa_REMARk to come back later // TODO Mosa_REMARk to come back later
getDoctorsList(BuildContext context) { getDoctorsList(BuildContext context) {
SearchInfo searchInfo = new SearchInfo(); SearchInfo searchInfo = new SearchInfo();
if (dropdownValue != null) if (dropdownValue.split("-")[0] == "17") { if (dropdownValue != null) if (dropdownValue!.split("-")[0] == "17") {
searchInfo.ProjectID = int.parse(projectDropdownValue); searchInfo.ProjectID = int.parse(projectDropdownValue!);
searchInfo.ClinicID = int.parse(dropdownValue.split("-")[0]); searchInfo.ClinicID = int.parse(dropdownValue!.split("-")[0]);
searchInfo.hospital = selectedHospital; searchInfo.hospital = selectedHospital;
searchInfo.clinic = selectedClinic; searchInfo.clinic = selectedClinic;
searchInfo.date = DateTime.now(); searchInfo.date = DateTime.now();
if (projectViewModel.isLogin) { if (projectViewModel.isLogin) {
if (projectViewModel.user!.age! > 12) { if (projectViewModel.user.age! > 12) {
navigateToDentalComplaints(context, searchInfo); navigateToDentalComplaints(context, searchInfo);
} else { } else {
callDoctorsSearchAPI(17); callDoctorsSearchAPI(17);
@ -571,17 +571,17 @@ class _SearchByClinicState extends State<SearchByClinic> {
} else { } else {
navigateToDentalComplaints(context, searchInfo); navigateToDentalComplaints(context, searchInfo);
} }
} else if (dropdownValue.split("-")[0] == "253") { } else if (dropdownValue!.split("-")[0] == "253") {
navigateToLaserClinic(context); navigateToLaserClinic(context);
// callDoctorsSearchAPI(); // callDoctorsSearchAPI();
} else if (dropdownValue.split("-")[1] == "true" } else if (dropdownValue!.split("-")[1] == "true"
// && authProvider.isLogin && // && authProvider.isLogin &&
// authUser.patientType == 1 // authUser.patientType == 1
) { ) {
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
page: LiveCareBookAppointment(clinicName: dropdownTitle, liveCareClinicID: dropdownValue.split("-")[2], liveCareServiceID: dropdownValue.split("-")[3]), page: LiveCareBookAppointment(clinicName: dropdownTitle, liveCareClinicID: dropdownValue!.split("-")[2], liveCareServiceID: dropdownValue!.split("-")[3]),
), ),
).then((value) { ).then((value) {
setState(() { setState(() {
@ -591,11 +591,11 @@ class _SearchByClinicState extends State<SearchByClinic> {
Navigator.push(context, FadePage(page: LiveCareHome())); Navigator.push(context, FadePage(page: LiveCareHome()));
} }
if (value == "schedule") { if (value == "schedule") {
callDoctorsSearchAPI(int.parse(dropdownValue.split("-")[0])); callDoctorsSearchAPI(int.parse(dropdownValue!.split("-")[0]));
} }
}); });
} else { } else {
callDoctorsSearchAPI(int.parse(dropdownValue.split("-")[0])); callDoctorsSearchAPI(int.parse(dropdownValue!.split("-")[0]));
} }
} }
@ -609,7 +609,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = []; List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = [];
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service.getDoctorsList(clinicID, projectDropdownValue != "" ? int.parse(projectDropdownValue) : 0, nearestAppo, context).then((res) { service.getDoctorsList(clinicID, projectDropdownValue != "" ? int.parse(projectDropdownValue!) : 0, nearestAppo, context).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {

@ -88,7 +88,7 @@ class DoctorView extends StatelessWidget {
), ),
), ),
Text( Text(
DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(doctor.date)), doctor.date != null ? DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(doctor.date )) : DateTime.now().toString(),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12), style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
), ),
], ],

@ -62,7 +62,7 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
AmbulanceRequestOrdersModel order = widget.amRequestViewModel.pendingAmbulanceRequestOrder; AmbulanceRequestOrdersModel order = widget.amRequestViewModel.pendingAmbulanceRequestOrder ?? AmbulanceRequestOrdersModel();
if(widget.amRequestViewModel.pendingAmbulanceRequestOrder != null) { if(widget.amRequestViewModel.pendingAmbulanceRequestOrder != null) {
int status = order.statusId!; int status = order.statusId!;

@ -44,17 +44,17 @@ class _PickupLocationState extends State<PickupLocation> {
// double _latitude; // double _latitude;
// double _longitude; // double _longitude;
late AppoitmentAllHistoryResultList myAppointment; AppoitmentAllHistoryResultList? myAppointment;
late HospitalsModel _selectedHospital; HospitalsModel? _selectedHospital;
late LocationDetails _result; LocationDetails? _result ;
late LocationUtils locationUtils; LocationUtils? locationUtils;
late ProjectViewModel projectViewModel; late ProjectViewModel projectViewModel;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context); locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
WidgetsBinding.instance.addPostFrameCallback((_) => locationUtils.getCurrentLocation()); WidgetsBinding.instance.addPostFrameCallback((_) => locationUtils!.getCurrentLocation());
setState(() {}); setState(() {});
} }
@ -117,7 +117,7 @@ class _PickupLocationState extends State<PickupLocation> {
)), )),
); );
} else { } else {
locationUtils.getCurrentLocation(); locationUtils!.getCurrentLocation();
} }
}, },
child: Row( child: Row(
@ -289,17 +289,17 @@ class _PickupLocationState extends State<PickupLocation> {
height: 12, height: 12,
), ),
DoctorCard( DoctorCard(
isInOutPatient: myAppointment.isInOutPatient, isInOutPatient: myAppointment!.isInOutPatient,
name: myAppointment.doctorTitle! + " " + myAppointment.doctorNameObj!, name: myAppointment!.doctorTitle! + " " + myAppointment!.doctorNameObj!,
profileUrl: myAppointment.doctorImageURL, profileUrl: myAppointment!.doctorImageURL,
subName: myAppointment.clinicName, subName: myAppointment!.clinicName,
isLiveCareAppointment: myAppointment.isLiveCareAppointment, isLiveCareAppointment: myAppointment!.isLiveCareAppointment,
date: DateUtil.convertStringToDate(myAppointment.appointmentDate!), date: DateUtil.convertStringToDate(myAppointment!.appointmentDate!),
isSortByClinic: false, isSortByClinic: false,
rating: myAppointment.actualDoctorRate! + 0.0, rating: myAppointment!.actualDoctorRate! + 0.0,
appointmentTime: myAppointment.isLiveCareAppointment! appointmentTime: myAppointment!.isLiveCareAppointment!
? DateUtil.convertStringToDate(myAppointment.appointmentDate!).toString().split(" ")[1].substring(0, 5) ? DateUtil.convertStringToDate(myAppointment!.appointmentDate!).toString().split(" ")[1].substring(0, 5)
: myAppointment.startTime!.substring(0, 5), : myAppointment!.startTime!.substring(0, 5),
remainingTimeInMinutes: null), remainingTimeInMinutes: null),
], ],
), ),
@ -458,7 +458,7 @@ class _PickupLocationState extends State<PickupLocation> {
), ),
); );
} else { } else {
locationUtils.getCurrentLocation(); locationUtils!.getCurrentLocation();
} }
}, },
child: Row( child: Row(
@ -520,39 +520,39 @@ class _PickupLocationState extends State<PickupLocation> {
widget.patientER_RC.transportationDetails!.pickupSpot = _isInsideHome ? 1 : 0; widget.patientER_RC.transportationDetails!.pickupSpot = _isInsideHome ? 1 : 0;
if (widget.patientER_RC.transportationDetails!.direction == 0) { if (widget.patientER_RC.transportationDetails!.direction == 0) {
// To Hospital // To Hospital
widget.patientER_RC.transportationDetails!.dropoffLatitude = _result.lat.toStringAsFixed(6); widget.patientER_RC.transportationDetails!.dropoffLatitude = _result!.lat.toStringAsFixed(6);
widget.patientER_RC.transportationDetails!.dropoffLongitude = _result.long.toStringAsFixed(6); widget.patientER_RC.transportationDetails!.dropoffLongitude = _result!.long.toStringAsFixed(6);
widget.patientER_RC.transportationDetails!.pickupLatitude = _selectedHospital.latitude; widget.patientER_RC.transportationDetails!.pickupLatitude = _selectedHospital!.latitude;
widget.patientER_RC.transportationDetails!.pickupLongitude = _selectedHospital.longitude; widget.patientER_RC.transportationDetails!.pickupLongitude = _selectedHospital!.longitude;
} else { } else {
// From Hospital // From Hospital
widget.patientER_RC.transportationDetails!.pickupLatitude = _selectedHospital.latitude; widget.patientER_RC.transportationDetails!.pickupLatitude = _selectedHospital!.latitude;
widget.patientER_RC.transportationDetails!.pickupLongitude = _selectedHospital.longitude; widget.patientER_RC.transportationDetails!.pickupLongitude = _selectedHospital!.longitude;
widget.patientER_RC.transportationDetails!.dropoffLatitude = _result.lat.toStringAsFixed(6); widget.patientER_RC.transportationDetails!.dropoffLatitude = _result!.lat.toStringAsFixed(6);
widget.patientER_RC.transportationDetails!.dropoffLongitude = _result.long.toStringAsFixed(6); widget.patientER_RC.transportationDetails!.dropoffLongitude = _result!.long.toStringAsFixed(6);
} }
widget.patientER_RC.transportationDetails!.dropoffLocationName = widget.patientER_RC.transportationDetails!.direction == 1 ? _result.formattedAddress : _selectedHospital.name; widget.patientER_RC.transportationDetails!.dropoffLocationName = widget.patientER_RC.transportationDetails!.direction == 1 ? _result!.formattedAddress : _selectedHospital!.name;
widget.patientER_RC.patientIdentificationID = widget.amRequestViewModel.user!.patientIdentificationNo; widget.patientER_RC.patientIdentificationID = widget.amRequestViewModel.user.patientIdentificationNo;
widget.patientER_RC.transportationDetails!.pickupDateTime = DateUtil.convertDateToStringLocation(DateTime.now()); widget.patientER_RC.transportationDetails!.pickupDateTime = DateUtil.convertDateToStringLocation(DateTime.now());
widget.patientER_RC.transportationDetails!.pickupLocationName = widget.patientER_RC.transportationDetails!.direction == 1 ? _selectedHospital.name : _result.formattedAddress; widget.patientER_RC.transportationDetails!.pickupLocationName = widget.patientER_RC.transportationDetails!.direction == 1 ? _selectedHospital!.name : _result!.formattedAddress;
widget.patientER_RC.projectID = widget.amRequestViewModel.user!.projectID; widget.patientER_RC.projectID = widget.amRequestViewModel.user.projectID;
widget.patientER_RC.patientID = widget.amRequestViewModel.user!.patientID; widget.patientER_RC.patientID = widget.amRequestViewModel.user.patientID;
widget.patientER_RC.transportationDetails!.requesterIsOutSA = false; widget.patientER_RC.transportationDetails!.requesterIsOutSA = false;
widget.patientER_RC.transportationDetails!.requesterMobileNo = widget.amRequestViewModel.user!.mobileNumber; widget.patientER_RC.transportationDetails!.requesterMobileNo = widget.amRequestViewModel.user.mobileNumber;
widget.patientER_RC.transportationDetails!.requesterFileNo = widget.amRequestViewModel.user!.patientID; widget.patientER_RC.transportationDetails!.requesterFileNo = widget.amRequestViewModel.user.patientID;
if (_haveAppointment == HaveAppointment.YES) { if (_haveAppointment == HaveAppointment.YES) {
widget.patientER_RC.transportationDetails!.appointmentNo = myAppointment.appointmentNo.toString(); widget.patientER_RC.transportationDetails!.appointmentNo = myAppointment!.appointmentNo.toString();
widget.patientER_RC.transportationDetails!.appointmentClinicName = myAppointment.clinicName; widget.patientER_RC.transportationDetails!.appointmentClinicName = myAppointment!.clinicName;
widget.patientER_RC.transportationDetails!.appointmentDoctorName = myAppointment.doctorNameObj; widget.patientER_RC.transportationDetails!.appointmentDoctorName = myAppointment!.doctorNameObj;
widget.patientER_RC.transportationDetails!.appointmentBranch = myAppointment.projectName; widget.patientER_RC.transportationDetails!.appointmentBranch = myAppointment!.projectName;
widget.patientER_RC.transportationDetails!.appointmentTime = myAppointment.appointmentDate; widget.patientER_RC.transportationDetails!.appointmentTime = myAppointment!.appointmentDate;
widget.patientER_RC.transportationDetails!.haveAppointment = 1; widget.patientER_RC.transportationDetails!.haveAppointment = 1;
widget.patientER_RC.transportationDetails!.dropoffLatitude = myAppointment.latitude; widget.patientER_RC.transportationDetails!.dropoffLatitude = myAppointment!.latitude;
widget.patientER_RC.transportationDetails!.dropoffLongitude = myAppointment.longitude; widget.patientER_RC.transportationDetails!.dropoffLongitude = myAppointment!.longitude;
widget.patientER_RC.transportationDetails!.dropoffLocationName = myAppointment.projectName; widget.patientER_RC.transportationDetails!.dropoffLocationName = myAppointment!.projectName;
} else { } else {
widget.patientER_RC.transportationDetails!.appointmentNo = "0"; widget.patientER_RC.transportationDetails!.appointmentNo = "0";
widget.patientER_RC.transportationDetails!.appointmentClinicName = ""; widget.patientER_RC.transportationDetails!.appointmentClinicName = "";
@ -593,11 +593,15 @@ class _PickupLocationState extends State<PickupLocation> {
} }
String getHospitalName(String title) { String getHospitalName(String title) {
return _selectedHospital == null ? title : _selectedHospital.name!; return _selectedHospital == null ? title : _selectedHospital!.name!;
} }
String getSelectFromMapName(context) { String getSelectFromMapName(context) {
return _result != null ? _result.formattedAddress : ""; return _result != null
? _result!.formattedAddress != null
? _result!.formattedAddress!
: ""
: "";
} }
getAppointment() { getAppointment() {
@ -619,11 +623,11 @@ class _PickupLocationState extends State<PickupLocation> {
setState(() { setState(() {
myAppointment = value; myAppointment = value;
HospitalsModel hospitalsModel = HospitalsModel(); HospitalsModel hospitalsModel = HospitalsModel();
hospitalsModel.name = myAppointment.projectName; hospitalsModel.name = myAppointment!.projectName;
hospitalsModel.iD = myAppointment.projectID; hospitalsModel.iD = myAppointment!.projectID;
hospitalsModel.mainProjectID = myAppointment.projectID; hospitalsModel.mainProjectID = myAppointment!.projectID;
hospitalsModel.latitude = myAppointment.latitude; hospitalsModel.latitude = myAppointment!.latitude;
hospitalsModel.longitude = myAppointment.longitude; hospitalsModel.longitude = myAppointment!.longitude;
_selectedHospital = hospitalsModel; _selectedHospital = hospitalsModel;
}); });
else { else {

@ -102,7 +102,6 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
margin: EdgeInsets.only(left: 20, right: 20, top: 8, bottom: 6), margin: EdgeInsets.only(left: 20, right: 20, top: 8, bottom: 6),
child: SliderView( child: SliderView(
onLoginClick: () { onLoginClick: () {
print("-----------");
widget.onLoginClick!(); widget.onLoginClick!();
projectViewModel.analytics.loginRegistration.login_register_initiate(); projectViewModel.analytics.loginRegistration.login_register_initiate();
}, },

@ -565,7 +565,6 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
changeCurrentTab(1); changeCurrentTab(1);
}, },
onLoginClick: () { onLoginClick: () {
print("here i am");
login(); login();
}, },
onMedicalFileClick: () { onMedicalFileClick: () {

@ -8,6 +8,7 @@ import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_mod
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart'; import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/main.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart';
@ -59,7 +60,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
PharmacyModuleViewModel pharmacyModuleViewModel = locator<PharmacyModuleViewModel>(); PharmacyModuleViewModel pharmacyModuleViewModel = locator<PharmacyModuleViewModel>();
late int mobileNumber; late int mobileNumber;
String errorMsg = ''; String errorMsg = '';
SelectDeviceIMEIRES user = SelectDeviceIMEIRES(); SelectDeviceIMEIRES? user;
bool isLoading = false; bool isLoading = false;
var registerd_data; var registerd_data;
bool isMoreOption = false; bool isMoreOption = false;
@ -107,7 +108,6 @@ class _ConfirmLogin extends State<ConfirmLogin> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
toDoProvider = Provider.of<ToDoCountProviderModel>(context); toDoProvider = Provider.of<ToDoCountProviderModel>(context);
return Scaffold( return Scaffold(
backgroundColor: Color(0xfff8f8f8), backgroundColor: Color(0xfff8f8f8),
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
@ -139,7 +139,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64), style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64),
), ),
Text( Text(
user.name!.toLowerCase().capitalizeFirstofEach, user!.name!.toLowerCase().capitalizeFirstofEach,
style: TextStyle(fontSize: 24, fontWeight: FontWeight.w700, color: Color(0xff2B353E), height: 1, letterSpacing: -1.44), style: TextStyle(fontSize: 24, fontWeight: FontWeight.w700, color: Color(0xff2B353E), height: 1, letterSpacing: -1.44),
), ),
SizedBox(height: 10), SizedBox(height: 10),
@ -172,10 +172,10 @@ class _ConfirmLogin extends State<ConfirmLogin> {
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64), style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64),
), ),
Text( Text(
user.editedOn != null user!.editedOn != null
? DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(user.editedOn!)) ? DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(user!.editedOn!))
: user.createdOn != null : user!.createdOn != null
? DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(user.createdOn!)) ? DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(user!.createdOn!))
: '--', : '--',
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48), style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48),
), ),
@ -194,7 +194,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
), ),
), ),
Text( Text(
" " + getType(user.logInType, context), " " + getType(user!.logInType, context),
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -203,10 +203,10 @@ class _ConfirmLogin extends State<ConfirmLogin> {
), ),
Expanded(child: SizedBox()), Expanded(child: SizedBox()),
Text( Text(
user.editedOn != null user!.editedOn != null
? DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(user.editedOn!), false) ? DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(user!.editedOn!), false)
: user.createdOn != null : user!.createdOn != null
? DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(user.createdOn!), false) ? DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(user!.createdOn!), false)
: '--', : '--',
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.48), style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.48),
), ),
@ -499,24 +499,25 @@ class _ConfirmLogin extends State<ConfirmLogin> {
} }
setDefault() async { setDefault() async {
showLoader(true);
if (await sharedPref.getObject(IMEI_USER_DATA) != null) user = SelectDeviceIMEIRES.fromJson(await sharedPref.getObject(IMEI_USER_DATA)); if (await sharedPref.getObject(IMEI_USER_DATA) != null) user = SelectDeviceIMEIRES.fromJson(await sharedPref.getObject(IMEI_USER_DATA));
if (await sharedPref.getObject(REGISTER_DATA_FOR_LOGIIN) != null) { if (await sharedPref.getObject(REGISTER_DATA_FOR_LOGIIN) != null) {
isMoreOption = true; isMoreOption = true;
this.registerd_data = CheckPatientAuthenticationReq.fromJson(await sharedPref.getObject(REGISTER_DATA_FOR_LOGIIN)); this.registerd_data = await CheckPatientAuthenticationReq.fromJson(await sharedPref.getObject(REGISTER_DATA_FOR_LOGIIN));
} }
this.mobileNumber = this.registerd_data != null ? this.registerd_data.patientMobileNumber : int.parse(this.user.mobile!); this.mobileNumber = this.registerd_data != null ? this.registerd_data.patientMobileNumber : int.parse(this.user!.mobile!);
this.zipCode = this.registerd_data != null this.zipCode = this.registerd_data != null
? this.registerd_data.zipCode ? this.registerd_data.zipCode
: this.user.outSA == true : this.user!.outSA == true
? "971" ? "971"
: "966"; : "966";
this.patientOutSA = this.registerd_data != null this.patientOutSA = this.registerd_data != null
? this.registerd_data.zipCode == "966" ? this.registerd_data.zipCode == "966"
? 0 ? 0
: 1 : 1
: this.user.outSA; : this.user!.outSA;
if (this.registerd_data != null) { if (this.registerd_data != null) {
this.loginTokenID = await sharedPref.getString(LOGIN_TOKEN_ID); this.loginTokenID = await sharedPref.getString(LOGIN_TOKEN_ID);
this.loginType = this.registerd_data.searchType; this.loginType = this.registerd_data.searchType;
@ -534,9 +535,10 @@ class _ConfirmLogin extends State<ConfirmLogin> {
this.lastLogin = await sharedPref.getInt(LAST_LOGIN) != null this.lastLogin = await sharedPref.getInt(LAST_LOGIN) != null
? await sharedPref.getInt(LAST_LOGIN) ? await sharedPref.getInt(LAST_LOGIN)
: user != null : user != null
? user.logInType ? user!.logInType
: null; : null;
showLoader(false);
//this.cs.sharedService.getStorage(AuthenticationService.LAST_LOGIN); //this.cs.sharedService.getStorage(AuthenticationService.LAST_LOGIN);
} }
@ -560,7 +562,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
request.isRegister = this.registerd_data.isRegister; request.isRegister = this.registerd_data.isRegister;
} else { } else {
request.searchType = request.searchType != null ? request.searchType : 2; request.searchType = request.searchType != null ? request.searchType : 2;
request.patientID = this.user.patientID != null ? this.user.patientID : 0; request.patientID = this.user!.patientID != null ? this.user!.patientID : 0;
request.nationalID = request.nationalID != null ? request.nationalID : '0'; request.nationalID = request.nationalID != null ? request.nationalID : '0';
request.patientIdentificationID = request.patientIdentificationID != null ? request.patientIdentificationID : '0'; request.patientIdentificationID = request.patientIdentificationID != null ? request.patientIdentificationID : '0';
request.isRegister = false; request.isRegister = false;

@ -15,7 +15,9 @@ import 'package:provider/provider.dart';
class MedicalProfilePageNew extends StatefulWidget { class MedicalProfilePageNew extends StatefulWidget {
Function()? onTap; Function()? onTap;
String? a; String? a;
MedicalProfilePageNew({this.onTap}); MedicalProfilePageNew({this.onTap});
@override @override
_MedicalProfilePageState createState() => _MedicalProfilePageState(); _MedicalProfilePageState createState() => _MedicalProfilePageState();
} }
@ -57,7 +59,7 @@ class _MedicalProfilePageState extends State<MedicalProfilePageNew> {
children: [ children: [
projectViewModel!.isLogin projectViewModel!.isLogin
? Text( ? Text(
projectViewModel?.user?.firstName ?? "", projectViewModel?.user.firstName ?? "",
style: TextStyle(color: Colors.black, fontSize: SizeConfig.textMultiplier! * 1.8), style: TextStyle(color: Colors.black, fontSize: SizeConfig.textMultiplier! * 1.8),
) )
: Container(), : Container(),

@ -44,7 +44,7 @@ class _AddWeightPageState extends State<AddWeightPage> {
"باوند", "باوند",
"كيلو جرام", "كيلو جرام",
]; ];
late String measureTimeSelectedType; String? measureTimeSelectedType;
bool isButtonDisabled = true; bool isButtonDisabled = true;
@override @override

@ -24,7 +24,8 @@ class WeightMonthlyPage extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
if (projectViewModel == null) projectViewModel = Provider.of(context); //if (projectViewModel == null)
projectViewModel = Provider.of(context);
groupData(); groupData();
return ListView( return ListView(
children: [ children: [

@ -24,7 +24,8 @@ class WeightWeeklyPage extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
if (projectViewModel == null) projectViewModel = Provider.of(context); ///if (projectViewModel == null)
projectViewModel = Provider.of(context);
return ListView( return ListView(
children: [ children: [
Container( Container(

@ -20,7 +20,8 @@ class BloodPressureMonthlyPage extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
if (projectViewModel == null) projectViewModel = Provider.of(context); // if (projectViewModel == null)
projectViewModel = Provider.of(context);
groupData(); groupData();
return ListView( return ListView(
children: [ children: [

@ -22,7 +22,8 @@ class BloodPressureYearPage extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
if (projectViewModel == null) projectViewModel = Provider.of(context); // if (projectViewModel == null)
projectViewModel = Provider.of(context);
groupData(); groupData();
return ListView( return ListView(
children: [ children: [

@ -22,7 +22,8 @@ class BloodPressureWeeklyPage extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
if (projectViewModel == null) projectViewModel = Provider.of(context); // if (projectViewModel == null)
projectViewModel = Provider.of(context);
return ListView( return ListView(
children: [ children: [
Container( Container(

@ -25,7 +25,7 @@ class BloodMonthlyPage extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
if (projectViewModel == null) projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
groupData(); groupData();
return AppScaffold( return AppScaffold(
body: ListView( body: ListView(

@ -23,7 +23,8 @@ class BloodYearPage extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
if (projectViewModel == null) projectViewModel = Provider.of(context); // if (projectViewModel == null)
projectViewModel = Provider.of(context);
groupData(); groupData();
return ListView( return ListView(

@ -128,7 +128,7 @@ class MonthCurvedChartBloodPressure extends StatelessWidget {
fontSize: 10, fontSize: 10,
); );
return Text( return Text(
timeSeries1![value.toInt()].time, timeSeries1![value.toInt()].time.toString(),
style: styl, style: styl,
); );
}), }),
@ -148,7 +148,7 @@ class MonthCurvedChartBloodPressure extends StatelessWidget {
fontSize: 10, fontSize: 10,
); );
return Text( return Text(
timeSeries1![value.toInt()].time, timeSeries1![value.toInt()].time.toString(),
style: styl, style: styl,
); );
} }

@ -61,9 +61,9 @@ class PrescriptionItemsPage extends StatelessWidget {
prescriptions.name!, prescriptions.name!,
DateUtil.convertStringToDate(prescriptions.appointmentDate!), DateUtil.convertStringToDate(prescriptions.appointmentDate!),
DateUtil.formatDateToTime( DateUtil.formatDateToTime(
DateUtil.convertStringToDate( model.prescriptionReportEnhList.length > 0 || model.prescriptionReportListINP.length > 0 ? DateUtil.convertStringToDate(
model.prescriptionReportEnhList.length > 0 ? model.prescriptionReportEnhList[0].orderDate! : model.prescriptionReportListINP[0].orderDate!, model.prescriptionReportEnhList.length > 0 ? model.prescriptionReportEnhList[0].orderDate! : model.prescriptionReportListINP[0].orderDate!,
), ) : DateTime.now(),
), ),
prescriptions.nationalityFlagURL!, prescriptions.nationalityFlagURL!,
prescriptions.doctorRate, prescriptions.doctorRate,

@ -50,7 +50,7 @@ class RadiologyDetailsPage extends StatelessWidget {
finalRadiology!.doctorName!, finalRadiology!.doctorName!,
finalRadiology!.doctorID!, finalRadiology!.doctorID!,
finalRadiology!.doctorImageURL!, finalRadiology!.doctorImageURL!,
finalRadiology!.speciality!, finalRadiology!.speciality ?? [""],
Utils.isVidaPlusProject(projectViewModel, finalRadiology!.projectID!) ? finalRadiology!.invoiceNo_VP.toString() : finalRadiology!.invoiceNo.toString(), Utils.isVidaPlusProject(projectViewModel, finalRadiology!.projectID!) ? finalRadiology!.invoiceNo_VP.toString() : finalRadiology!.invoiceNo.toString(),
finalRadiology!.projectName!, finalRadiology!.projectName!,
finalRadiology!.orderDate, finalRadiology!.orderDate,
@ -59,7 +59,7 @@ class RadiologyDetailsPage extends StatelessWidget {
finalRadiology!.doctorRate, finalRadiology!.doctorRate,
finalRadiology!.actualDoctorRate, finalRadiology!.actualDoctorRate,
finalRadiology!.noOfPatientsRate, finalRadiology!.noOfPatientsRate,
projectViewModel.user!.emailAddress!, projectViewModel.user.emailAddress!,
), ),
onTap: () { onTap: () {
showConfirmMessage(finalRadiology: finalRadiology!, model: model, userObj: projectViewModel.user!); showConfirmMessage(finalRadiology: finalRadiology!, model: model, userObj: projectViewModel.user!);

@ -20,9 +20,9 @@ class MonthlyReportsPage extends StatefulWidget {
} }
class _MonthlyReportsPageState extends State<MonthlyReportsPage> { class _MonthlyReportsPageState extends State<MonthlyReportsPage> {
late bool isAgree; bool isAgree = false;
late bool isSummary; bool isSummary = false;
late String email; String email = "";
final formKey = GlobalKey<FormState>(); final formKey = GlobalKey<FormState>();
List<ImagesInfo> imagesInfo = []; List<ImagesInfo> imagesInfo = [];
@ -47,7 +47,7 @@ class _MonthlyReportsPageState extends State<MonthlyReportsPage> {
isAgree = model.receiveHealthSummaryReport; isAgree = model.receiveHealthSummaryReport;
} }
if (email == null) { if (email == null) {
email = model?.user?.emailAddress ?? ""; email = model.user.emailAddress ?? "";
} }
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
@ -99,10 +99,11 @@ class _MonthlyReportsPageState extends State<MonthlyReportsPage> {
}); });
if (!isSummary) { if (!isSummary) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
print("is Summry: $isSummary");
await model.updatePatientHealthSummaryReport(message: TranslationBase.of(context).updateSuccessfully, isSummary: isSummary); await model.updatePatientHealthSummaryReport(message: TranslationBase.of(context).updateSuccessfully, isSummary: isSummary);
model.receiveHealthSummaryReport = isSummary; model.receiveHealthSummaryReport = isSummary;
isAgree = isSummary; isAgree = isSummary;
model.user!.emailAddress = ""; model.user.emailAddress = "";
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
} }
}, },
@ -187,7 +188,8 @@ class _MonthlyReportsPageState extends State<MonthlyReportsPage> {
RichText( RichText(
text: TextSpan( text: TextSpan(
text: TranslationBase.of(context).toViewTheTermsAndConditions + " ", text: TranslationBase.of(context).toViewTheTermsAndConditions + " ",
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16, fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'), style: TextStyle(
fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16, fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'),
children: [ children: [
TextSpan( TextSpan(
text: TranslationBase.of(context).clickHere, text: TranslationBase.of(context).clickHere,

@ -7,6 +7,7 @@ import 'package:diplomaticquarterapp/core/model/reports/Reports.dart';
import 'package:diplomaticquarterapp/core/service/medical/reports_service.dart'; import 'package:diplomaticquarterapp/core/service/medical/reports_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/main.dart';
import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
@ -41,6 +42,7 @@ class ReportListWidget extends StatelessWidget {
separatorBuilder: (context, index) => SizedBox(height: 14), separatorBuilder: (context, index) => SizedBox(height: 14),
itemBuilder: (context, index) { itemBuilder: (context, index) {
Reports report = reportList[index]; Reports report = reportList[index];
logger.d(report.toJson());
return Container( return Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
@ -105,7 +107,7 @@ class ReportListWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
RatingBar( RatingBar(
initialRating: report.actualDoctorRate!.toDouble(), initialRating:report.actualDoctorRate == null ? 0.0: report.actualDoctorRate!.toDouble(),
itemSize: 16, itemSize: 16,
ratingWidget: RatingWidget( ratingWidget: RatingWidget(
full: Icon( full: Icon(

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/main.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart';
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart'; import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
@ -378,23 +379,29 @@ class DoctorsListService extends BaseService {
}; };
if (clinicID == 253) { if (clinicID == 253) {
List<String> procedureID = projectViewModel!.selectedBodyPartList!.map((element) => element.id.toString()).toList(); List<String> procedureID = projectViewModel!.selectedBodyPartList.map((element) => element.id.toString()).toList();
request["GeneralProcedureList"] = procedureID; request["GeneralProcedureList"] = procedureID;
if (procedureID.length == 1 && procedureID[0] == "1") { if (procedureID.length == 1 && procedureID[0] == "1") {
request["InitialSlotDuration"] = 90; request["InitialSlotDuration"] = 90;
} else { } else {
request["InitialSlotDuration"] = projectViewModel!.laserSelectionDuration!; request["InitialSlotDuration"] = projectViewModel.laserSelectionDuration;
} }
} }
dynamic localRes; dynamic localRes;
try {
await baseAppClient.post(INSERT_SPECIFIC_APPOINTMENT, onSuccess: (response, statusCode) async { await baseAppClient.post(INSERT_SPECIFIC_APPOINTMENT, onSuccess: (response, statusCode) async {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
logger.d(error);
throw error; throw error;
}, body: request); }, body: request);
logger.d(localRes);
return Future.value(localRes); return Future.value(localRes);
} catch (e) {
logger.d(e);
return Future.error(e);
}
} }
Future<Map> insertLiveCareScheduleAppointment(int docID, int clinicID, int projectID, int serviceID, String selectedTime, String selectedDate, BuildContext context) async { Future<Map> insertLiveCareScheduleAppointment(int docID, int clinicID, int projectID, int serviceID, String selectedTime, String selectedDate, BuildContext context) async {
@ -1841,6 +1848,4 @@ class DoctorsListService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
} }

@ -31,7 +31,7 @@ class AppToast {
int? elevation, int? elevation,
int imageSize = 32, int imageSize = 32,
}) { }) {
Fluttertoast.showToast(msg: message, toastLength: toastLength, gravity: toastGravity, timeInSecForIosWeb: timeInSeconds!, backgroundColor: Colors.green, textColor: textColor, fontSize: fontSize); Fluttertoast.showToast(msg: message, toastLength: toastLength, gravity: toastGravity, timeInSecForIosWeb: timeInSeconds ?? 0, backgroundColor: Colors.green, textColor: textColor, fontSize: fontSize);
} }
static void showErrorToast({ static void showErrorToast({

@ -14,4 +14,5 @@ class GifLoaderDialogUtils {
Future.delayed(Duration(milliseconds: 250)).then((value) => Navigator.of(context).pop()); Future.delayed(Duration(milliseconds: 250)).then((value) => Navigator.of(context).pop());
} }
} }
} }

@ -617,7 +617,7 @@ class Utils {
List<Widget> medical = []; List<Widget> medical = [];
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel!.havePrivilege(5) ? Navigator.push(context!, FadePage(page: MyAppointments())) : null, onTap: () => projectViewModel.havePrivilege(5) ? Navigator.push(context!, FadePage(page: MyAppointments())) : null,
child: isLogin! child: isLogin!
? Stack(children: [ ? Stack(children: [
MedicalProfileItem( MedicalProfileItem(

@ -56,7 +56,7 @@ class LargeAvatar extends StatelessWidget {
} else } else
return Center( return Center(
child: Texts( child: Texts(
name![0].toUpperCase(), name == null? "" : name![0].toUpperCase(),
color: Colors.white, color: Colors.white,
fontSize: 18, fontSize: 18,
)); ));

@ -1,5 +1,7 @@
import 'package:diplomaticquarterapp/core/model/pharmacies/order_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart'; import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
@ -206,6 +208,7 @@ class DoctorCard extends StatelessWidget {
itemSize: 20.0, itemSize: 20.0,
allowHalfRating: true, allowHalfRating: true,
initialRating: rating!, initialRating: rating!,
ignoreGestures: true,
ratingWidget: RatingWidget( ratingWidget: RatingWidget(
full: Icon( full: Icon(
Icons.star, Icons.star,
@ -213,7 +216,7 @@ class DoctorCard extends StatelessWidget {
), ),
half: Icon( half: Icon(
Icons.star_half, Icons.star_half,
color: Color(0XFFD02127), color: CustomColors.accentColor,
), ),
empty: Icon( empty: Icon(
Icons.star_border, Icons.star_border,

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/main.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart'; import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/AppointmentDetails.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/AppointmentDetails.dart';
@ -35,30 +36,37 @@ class TimeLineView extends StatefulWidget {
class _TimeLineViewState extends State<TimeLineView> { class _TimeLineViewState extends State<TimeLineView> {
List<AppoitmentAllHistoryResultList> tempList = []; List<AppoitmentAllHistoryResultList> tempList = [];
List<DateObj> dateObjs = []; List<DateObj> dateObjs = [];
DateObj selectedDateObj = DateObj(DateTime.now().month,DateTime.now().year,DateTime.now().year.toString());
final authService = new auth.AuthProvider(); DateObj? selectedDateObj;
final authService = auth.AuthProvider();
@override @override
void initState() { void initState() {
super.initState(); super.initState();
dateObjs.add(new DateObj(0, 0, widget.isArabic ? "الكل" : "All")); // selectedDateObj = DateObj(DateTime.august, 2021, 2021.toString());
dateObjs.add(DateObj(0, 0, widget.isArabic ? "الكل" : "All"));
for (int i = 0; i < widget.appoitmentAllHistoryResultList.length; i++) { for (int i = 0; i < widget.appoitmentAllHistoryResultList.length; i++) {
tempList.add(widget.appoitmentAllHistoryResultList[i]); tempList.add(widget.appoitmentAllHistoryResultList[i]);
dateObjs.add(new DateObj( dateObjs.add(
DateObj(
DateUtil.convertStringToDate(widget.appoitmentAllHistoryResultList[i].appointmentDate!).month, DateUtil.convertStringToDate(widget.appoitmentAllHistoryResultList[i].appointmentDate!).month,
DateUtil.convertStringToDate(widget.appoitmentAllHistoryResultList[i].appointmentDate!).year, DateUtil.convertStringToDate(widget.appoitmentAllHistoryResultList[i].appointmentDate!).year,
DateUtil.getMonthYearLangDateFormatted( DateUtil.getMonthYearLangDateFormatted(
DateUtil.convertStringToDate(widget.appoitmentAllHistoryResultList[i].appointmentDate!), DateUtil.convertStringToDate(widget.appoitmentAllHistoryResultList[i].appointmentDate!),
widget.isArabic ? "ar" : "en", widget.isArabic ? "ar" : "en",
))); ),
),
);
} }
dateObjs = dateObjs.toSet().toList(); dateObjs = dateObjs.toSet().toList();
dateObjs.sort((a, b) => a.month.compareTo(b.month)); dateObjs.sort((a, b) => a.month.compareTo(b.month));
dateObjs.sort((a, b) => a.year.compareTo(b.year)); dateObjs.sort((a, b) => a.year.compareTo(b.year));
logger.d(dateObjs);
// for (int i = 0; i < dateObjs.length; i++) { for (int i = 0; i < dateObjs.length; i++) {
// print(dateObjs[i].monthYear.toString()); print(dateObjs[i].monthYear.toString());
// } }
} }
applyFilter(bool isAll) { applyFilter(bool isAll) {
@ -73,7 +81,7 @@ class _TimeLineViewState extends State<TimeLineView> {
DateUtil.convertStringToDate(widget.appoitmentAllHistoryResultList[i].appointmentDate!), DateUtil.convertStringToDate(widget.appoitmentAllHistoryResultList[i].appointmentDate!),
widget.isArabic ? "ar" : "en", widget.isArabic ? "ar" : "en",
) == ) ==
selectedDateObj.monthYear) { selectedDateObj!.monthYear) {
tempList.add(widget.appoitmentAllHistoryResultList[i]); tempList.add(widget.appoitmentAllHistoryResultList[i]);
} }
} }
@ -142,14 +150,14 @@ class _TimeLineViewState extends State<TimeLineView> {
items: dateObjs.map((DateObj value) { items: dateObjs.map((DateObj value) {
return DropdownMenuItem<DateObj>( return DropdownMenuItem<DateObj>(
value: value, value: value,
child: new AutoSizeText( child: AutoSizeText(
value.monthYear, '${value.monthYear}',
), ),
); );
}).toList(), }).toList(),
onChanged: (r) { onChanged: (DateObj? r) {
selectedDateObj = r!; selectedDateObj = r!;
applyFilter(r?.year == 0 ? true : false); applyFilter(r.year == 0 ? true : false);
setState(() {}); setState(() {});
}, },
underline: Container( underline: Container(
@ -159,6 +167,7 @@ class _TimeLineViewState extends State<TimeLineView> {
), ),
), ),
) )
: Container() : Container()
], ],
), ),

@ -39,12 +39,12 @@ class _CustomSwitchState extends State<CustomSwitch> with SingleTickerProviderSt
bool _switchStatus = _circleAnimation!.status == AnimationStatus.dismissed || _circleAnimation!.status == AnimationStatus.reverse; bool _switchStatus = _circleAnimation!.status == AnimationStatus.dismissed || _circleAnimation!.status == AnimationStatus.reverse;
return GestureDetector( return GestureDetector(
onTap: Feedback.wrapForTap(() async { onTap: Feedback.wrapForTap(() async {
if (widget!.value!) { if (widget.value!) {
_animationController!.reverse(); _animationController!.reverse();
} else { } else {
_animationController!.forward(); _animationController!.forward();
} }
await widget!.onChanged!(); await widget.onChanged!();
}, context), }, context),
child: AnimatedContainer( child: AnimatedContainer(
duration: Duration(milliseconds: 200), duration: Duration(milliseconds: 200),

@ -134,6 +134,7 @@ class DoctorHeader extends StatelessWidget {
RatingBar( RatingBar(
itemSize: 20.0, itemSize: 20.0,
allowHalfRating: true, allowHalfRating: true,
ignoreGestures: true,
initialRating: headerModel.actualDoctorRate! + 0.0, initialRating: headerModel.actualDoctorRate! + 0.0,
ratingWidget: RatingWidget( ratingWidget: RatingWidget(
full: Icon( full: Icon(
@ -174,14 +175,14 @@ class DoctorHeader extends StatelessWidget {
onTap!(); onTap!();
}, },
child: Container( child: Container(
padding: EdgeInsets.only(top: 10, bottom: 10, right: 21, left: 15), padding: EdgeInsets.only(top: 10, bottom: 10, right: 15, left: 15),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0XFFD02127), borderRadius: projectViewModel.isArabic ? BorderRadius.only(topRight: Radius.circular(10)) : BorderRadius.only(topLeft: Radius.circular(10))), color: Color(0XFFD02127), borderRadius: projectViewModel.isArabic ? BorderRadius.only(topRight: Radius.circular(10)) : BorderRadius.only(topLeft: Radius.circular(10))),
child: Row( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
SvgPicture.asset(buttonIcon ?? 'assets/images/new/email.svg', width: 19.0), SvgPicture.asset(buttonIcon ?? 'assets/images/new/email.svg', width: 19.0),
SizedBox(width: 6), SizedBox(width: 4),
Text( Text(
buttonTitle == null ? TranslationBase.of(context).sendEmail : buttonTitle!, buttonTitle == null ? TranslationBase.of(context).sendEmail : buttonTitle!,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.64, height: 1), style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.64, height: 1),

Loading…
Cancel
Save