updated 3.13.6

dev_v3.13.6_voipcall
Sultan khan 2 years ago
parent 1ddac14efb
commit 62dc3c162a

@ -35,7 +35,7 @@ class _NewEReferralStepTowPageState extends State<NewEReferralStepTowPage> {
TextEditingController _patientNameTextController = TextEditingController(); TextEditingController _patientNameTextController = TextEditingController();
TextEditingController _patientIdentificationTextController = TextEditingController(); TextEditingController _patientIdentificationTextController = TextEditingController();
String mobileNo = ""; String mobileNo = "";
late GetAllCitiesResponseModel _selectedCity; GetAllCitiesResponseModel _selectedCity =GetAllCitiesResponseModel();
late GetAllSharedRecordsByStatusList selectedPatientFamily; late GetAllSharedRecordsByStatusList selectedPatientFamily;
@ -297,7 +297,7 @@ class _NewEReferralStepTowPageState extends State<NewEReferralStepTowPage> {
} }
String getRelationName() { String getRelationName() {
if (_selectedCity != null) if (_selectedCity?.description != null)
return _selectedCity.description!; return _selectedCity.description!;
else else
return TranslationBase.of(context).selectCity /*TranslationBase.of(context).selectHospital*/; return TranslationBase.of(context).selectCity /*TranslationBase.of(context).selectHospital*/;

@ -24,19 +24,19 @@ showReminderDialog(BuildContext context, DateTime dateTime, String doctorName, S
if (Platform.isAndroid) { if (Platform.isAndroid) {
if (await PermissionService.isCalendarPermissionEnabled()) { if (await PermissionService.isCalendarPermissionEnabled()) {
_showReminderDialog(context, dateTime, doctorName, eventId, appoDateFormatted, appoTimeFormatted, _showReminderDialog(context, dateTime, doctorName, eventId, appoDateFormatted, appoTimeFormatted,
onSuccess: onSuccess, title: title ?? "", description: description ?? "", onMultiDateSuccess: onMultiDateSuccess ?? (int) {}); onSuccess: onSuccess, title: title ?? "", description: description ?? "", onMultiDateSuccess: onMultiDateSuccess ?? null);
} else { } else {
Utils.showPermissionConsentDialog(context, TranslationBase.of(context).calendarPermission, () async { Utils.showPermissionConsentDialog(context, TranslationBase.of(context).calendarPermission, () async {
if (await Permission.calendarFullAccess.request().isGranted) { if (await Permission.calendarFullAccess.request().isGranted) {
_showReminderDialog(context, dateTime, doctorName, eventId, appoDateFormatted, appoTimeFormatted, _showReminderDialog(context, dateTime, doctorName, eventId, appoDateFormatted, appoTimeFormatted,
onSuccess: onSuccess, title: title ?? "", description: description ?? "", onMultiDateSuccess: onMultiDateSuccess ?? (int) {}); onSuccess: onSuccess, title: title ?? "", description: description ?? "", onMultiDateSuccess: onMultiDateSuccess ?? null);
} }
}); });
} }
} else { } else {
if (await Permission.calendarFullAccess.request().isGranted) { if (await Permission.calendarFullAccess.request().isGranted) {
_showReminderDialog(context, dateTime, doctorName, eventId, appoDateFormatted, appoTimeFormatted, _showReminderDialog(context, dateTime, doctorName, eventId, appoDateFormatted, appoTimeFormatted,
onSuccess: onSuccess, title: title ?? "", description: description ?? "", onMultiDateSuccess: onMultiDateSuccess ?? (int) {}); onSuccess: onSuccess, title: title ?? "", description: description ?? "", onMultiDateSuccess: onMultiDateSuccess ?? null);
} }
} }
} }
@ -44,7 +44,7 @@ showReminderDialog(BuildContext context, DateTime dateTime, String doctorName, S
final CalendarPlugin _myPlugin = CalendarPlugin(); final CalendarPlugin _myPlugin = CalendarPlugin();
Future<void> _showReminderDialog(BuildContext context, DateTime dateTime, String doctorName, String eventId, String appoDateFormatted, String appoTimeFormatted, Future<void> _showReminderDialog(BuildContext context, DateTime dateTime, String doctorName, String eventId, String appoDateFormatted, String appoTimeFormatted,
{required Function onSuccess, required String title, required String description, required Function(int) onMultiDateSuccess}) async { {required Function onSuccess, required String title, required String description, Function(int)? onMultiDateSuccess}) async {
return showDialog<void>( return showDialog<void>(
context: context, context: context,
barrierDismissible: true, // user must tap button! barrierDismissible: true, // user must tap button!
@ -77,7 +77,7 @@ Future<void> _showReminderDialog(BuildContext context, DateTime dateTime, String
text = "2 hours"; text = "2 hours";
} }
if (onMultiDateSuccess == null) { if (onMultiDateSuccess ==null) {
CalendarUtils calendarUtils = await CalendarUtils.getInstance(); CalendarUtils calendarUtils = await CalendarUtils.getInstance();
calendarUtils calendarUtils
.createOrUpdateEvent( .createOrUpdateEvent(

@ -47,7 +47,7 @@ class AddNewChildPage extends StatefulWidget {
class _AddNewChildPageState extends State<AddNewChildPage> { class _AddNewChildPageState extends State<AddNewChildPage> {
late int tappedIndex; late int tappedIndex;
late int checkedValue; int checkedValue =0;
@override @override
void initState() { void initState() {

@ -34,11 +34,15 @@ import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profil
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:huawei_hmsavailability/huawei_hmsavailability.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:map_launcher/map_launcher.dart'; import 'package:map_launcher/map_launcher.dart';
import 'package:maps_launcher/maps_launcher.dart'; import 'package:maps_launcher/maps_launcher.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
import 'dart:io';
import 'package:huawei_map/huawei_map.dart' as hmsMap;
class AppointmentActions extends StatefulWidget { class AppointmentActions extends StatefulWidget {
AppoitmentAllHistoryResultList appo; AppoitmentAllHistoryResultList appo;
@ -55,10 +59,13 @@ class AppointmentActions extends StatefulWidget {
class _AppointmentActionsState extends State<AppointmentActions> { class _AppointmentActionsState extends State<AppointmentActions> {
List<AppoDetailsButton> appoButtonsList = []; List<AppoDetailsButton> appoButtonsList = [];
static bool isHuawei =false;
late HmsApiAvailability hmsApiAvailability;
@override @override
void initState() { void initState() {
_getAppointmentActionButtons(); _getAppointmentActionButtons();
checkIsHuawei();
super.initState(); super.initState();
} }
@ -455,13 +462,22 @@ class _AppointmentActionsState extends State<AppointmentActions> {
static Future<void> openMap(double latitude, double longitude) async { static Future<void> openMap(double latitude, double longitude) async {
await MapLauncher.showMarker( await MapLauncher.showMarker(
mapType: MapType.google, mapType: Platform.isAndroid ? isHuawei == true ? MapType.petal: MapType.google : MapType.apple,
coords: Coords(latitude, longitude), coords: Coords(latitude, longitude),
title: "Sulaiman Al Habib", title: "Sulaiman Al Habib",
description: "Appointment Location", description: "Appointment Location",
); );
} }
checkIsHuawei() async {
if( Platform.isAndroid) {
await hmsApiAvailability.isHMSAvailable().then((value) {
isHuawei = value == 0 ? true : false;
hmsMap.HuaweiMapInitializer.initializeMap();
});
print(isHuawei);
}
}
askYourDoc() { askYourDoc() {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();

@ -68,7 +68,6 @@ import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:speech_to_text/speech_recognition_error.dart'; import 'package:speech_to_text/speech_recognition_error.dart';
import 'package:speech_to_text/speech_to_text.dart' as stt; import 'package:speech_to_text/speech_to_text.dart' as stt;
import 'package:speech_to_text/speech_to_text.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
class FloatingSearchButton extends StatefulWidget { class FloatingSearchButton extends StatefulWidget {
@ -144,7 +143,7 @@ class _FloatingSearchButton extends State<FloatingSearchButton> with TickerProvi
if (p['startPopUp'] == 'true') { if (p['startPopUp'] == 'true') {
if (this.mounted) { if (this.mounted) {
new RoboSearch(context: context).showAlertDialog(context); new RoboSearch(context: context).showAlertDialog(context);
// initSpeechState().then((value) => {startVoiceSearch()}); initSpeechState().then((value) => {startVoiceSearch()});
} }
} }
}); });
@ -259,16 +258,19 @@ class _FloatingSearchButton extends State<FloatingSearchButton> with TickerProvi
// } // }
// some time later... // some time later...
if(available) { if(available) {
speech.stop();
// speech.listen( onResult: resultListener );
// speech.stop();
speech.listen( speech.listen(
onResult: resultListener, onResult: resultListener,
listenFor: Duration(seconds: 10), listenFor: Duration(seconds: 10),
localeId: _currentLocaleId == 'en' ? 'en-US' : 'ar-SA', localeId: _currentLocaleId == 'en' ? 'en-US' : 'ar-SA',
onSoundLevelChange: soundLevelListener, onSoundLevelChange: soundLevelListener,
cancelOnError: true, // cancelOnError: true,
partialResults: true, // partialResults: true,
onDevice: true, // onDevice: true,
listenMode: ListenMode.deviceDefault); // listenMode: stt.ListenMode.deviceDefault
);
} }
} }

Loading…
Cancel
Save