|
|
|
@ -1,27 +1,44 @@
|
|
|
|
import 'dart:collection';
|
|
|
|
import 'dart:collection';
|
|
|
|
|
|
|
|
import 'dart:io';
|
|
|
|
import 'dart:math';
|
|
|
|
import 'dart:math';
|
|
|
|
import 'package:diplomaticquarterapp/config/config.dart';
|
|
|
|
import 'package:diplomaticquarterapp/config/config.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart';
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/my_web_view.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/parking_page.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/Blood/my_balance_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/ContactUs/findus/findus_page.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/ErService/AmbulanceReq.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/ErService/NearestEr.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/ErService/NearestEr.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/family/my-family.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/login/welcome.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/balance/advance_payment_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/doctor/doctor_home_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/doctor/doctor_home_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/labs/labs_home_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/labs/labs_home_page.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_home_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_home_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/reports/report_home_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/reports/report_home_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/vaccine/my_vaccines_screen.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/vaccine/my_vaccines_screen.dart';
|
|
|
|
import 'package:diplomaticquarterapp/routes.dart';
|
|
|
|
import 'package:diplomaticquarterapp/routes.dart';
|
|
|
|
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
|
|
|
|
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
|
|
|
|
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
|
|
|
|
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
|
|
|
|
import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart';
|
|
|
|
import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/robo-search/robosearch.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/robo-search/robosearch.dart';
|
|
|
|
@ -30,6 +47,7 @@ import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
|
|
import 'package:flutter_tts/flutter_tts.dart';
|
|
|
|
import 'package:flutter_tts/flutter_tts.dart';
|
|
|
|
import 'package:permission_handler/permission_handler.dart';
|
|
|
|
import 'package:permission_handler/permission_handler.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_recognition_result.dart';
|
|
|
|
import 'package:speech_to_text/speech_recognition_result.dart';
|
|
|
|
import 'package:speech_to_text/speech_to_text.dart';
|
|
|
|
import 'package:speech_to_text/speech_to_text.dart';
|
|
|
|
@ -38,6 +56,7 @@ import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
|
|
|
|
|
|
|
import 'package:smart_progress_bar/smart_progress_bar.dart';
|
|
|
|
import 'package:smart_progress_bar/smart_progress_bar.dart';
|
|
|
|
|
|
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class FloatingSearchButton extends StatefulWidget {
|
|
|
|
class FloatingSearchButton extends StatefulWidget {
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
@ -67,11 +86,12 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
|
|
|
|
bool isSearching = false;
|
|
|
|
bool isSearching = false;
|
|
|
|
Map results = {};
|
|
|
|
Map results = {};
|
|
|
|
String lastStatus;
|
|
|
|
String lastStatus;
|
|
|
|
|
|
|
|
AuthenticatedUser user;
|
|
|
|
bool _isInit = true;
|
|
|
|
bool _isInit = true;
|
|
|
|
var event = RobotProvider();
|
|
|
|
var event = RobotProvider();
|
|
|
|
|
|
|
|
var sharedPref = new AppSharedPreferences();
|
|
|
|
bool _hasSpeech = false;
|
|
|
|
bool _hasSpeech = false;
|
|
|
|
|
|
|
|
ProjectViewModel projectProvider;
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
void initState() {
|
|
|
|
void initState() {
|
|
|
|
super.initState();
|
|
|
|
super.initState();
|
|
|
|
@ -83,14 +103,17 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
requestPermissions();
|
|
|
|
requestPermissions();
|
|
|
|
// Future.delayed(const Duration(seconds: 10), () {
|
|
|
|
// Future.delayed(const Duration(seconds: 10), () {
|
|
|
|
initSpeechState().then((value) => {});
|
|
|
|
initSpeechState().then((value) => {});
|
|
|
|
|
|
|
|
getUserData();
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
|
|
|
projectProvider = Provider.of(context);
|
|
|
|
return AnimatedPositioned(
|
|
|
|
return AnimatedPositioned(
|
|
|
|
onEnd: () {
|
|
|
|
onEnd: () {
|
|
|
|
// setState(() {
|
|
|
|
// setState(() {
|
|
|
|
@ -156,7 +179,9 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
|
|
|
|
child: GestureDetector(
|
|
|
|
child: GestureDetector(
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {
|
|
|
|
setState(() {
|
|
|
|
setState(() {
|
|
|
|
|
|
|
|
if (this.mounted) {
|
|
|
|
activeAnimation = true;
|
|
|
|
activeAnimation = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
child: Align(
|
|
|
|
child: Align(
|
|
|
|
@ -169,45 +194,7 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
])
|
|
|
|
]));
|
|
|
|
|
|
|
|
|
|
|
|
// Stack(
|
|
|
|
|
|
|
|
// fit: StackFit.loose,
|
|
|
|
|
|
|
|
// overflow: Overflow.visible,
|
|
|
|
|
|
|
|
// children: <Widget>[
|
|
|
|
|
|
|
|
// Container(),
|
|
|
|
|
|
|
|
// Positioned(
|
|
|
|
|
|
|
|
// child: GestureDetector(
|
|
|
|
|
|
|
|
// behavior: HitTestBehavior.translucent,
|
|
|
|
|
|
|
|
// onTapDown: (TapDownDetails details) => {
|
|
|
|
|
|
|
|
// setState(() {
|
|
|
|
|
|
|
|
// activeAnimation = true;
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// }, // handle your image tap here
|
|
|
|
|
|
|
|
// child: Image.asset(
|
|
|
|
|
|
|
|
// 'assets/images/CloseIcon.png',
|
|
|
|
|
|
|
|
// fit: BoxFit.cover, // this is the solution for border
|
|
|
|
|
|
|
|
// width: 30.0,
|
|
|
|
|
|
|
|
// height: 30.0,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// )),
|
|
|
|
|
|
|
|
// Positioned(
|
|
|
|
|
|
|
|
// child: GestureDetector(
|
|
|
|
|
|
|
|
// onTap: () {
|
|
|
|
|
|
|
|
// this.roboSearch(context);
|
|
|
|
|
|
|
|
// }, // handle your image tap here
|
|
|
|
|
|
|
|
// child: SvgPicture.asset('assets/images/robort_svg.svg')))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// // new RawMaterialButton(
|
|
|
|
|
|
|
|
// // // shape: new CircleBorder(),
|
|
|
|
|
|
|
|
// // elevation: 1.0,
|
|
|
|
|
|
|
|
// // child: SvgPicture.asset('assets/images/robort_svg.svg'),
|
|
|
|
|
|
|
|
// // onPressed: () {},
|
|
|
|
|
|
|
|
// // ),
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
// )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
startVoiceSearch() async {
|
|
|
|
startVoiceSearch() async {
|
|
|
|
@ -232,12 +219,11 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
|
|
|
|
if (result.finalResult == true) {
|
|
|
|
if (result.finalResult == true) {
|
|
|
|
// setState(() {
|
|
|
|
// setState(() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
reconizedWord = result.recognizedWords;
|
|
|
|
reconizedWord = result.recognizedWords;
|
|
|
|
event.setValue({"searchText": reconizedWord});
|
|
|
|
event.setValue({"searchText": reconizedWord});
|
|
|
|
setState(() {
|
|
|
|
// setState(() {
|
|
|
|
searchText = reconizedWord;
|
|
|
|
// searchText = reconizedWord;
|
|
|
|
});
|
|
|
|
// });
|
|
|
|
Future.delayed(const Duration(seconds: 1), () {
|
|
|
|
Future.delayed(const Duration(seconds: 1), () {
|
|
|
|
_speak(reconizedWord);
|
|
|
|
_speak(reconizedWord);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
@ -278,9 +264,9 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!mounted) return;
|
|
|
|
if (!mounted) return;
|
|
|
|
|
|
|
|
|
|
|
|
setState(() {
|
|
|
|
// setState(() {
|
|
|
|
_hasSpeech = hasSpeech;
|
|
|
|
// _hasSpeech = hasSpeech;
|
|
|
|
});
|
|
|
|
// });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void errorListener(SpeechRecognitionError error) {
|
|
|
|
void errorListener(SpeechRecognitionError error) {
|
|
|
|
@ -402,6 +388,19 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case '104':
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
List clnicID = unique(result['ClinicId']);
|
|
|
|
|
|
|
|
//= result['ProjectId'] ? result['ProjectId'] : 0; //result['ProjectId'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (clnicID.length == 1) {
|
|
|
|
|
|
|
|
getDoctorsList(result['ProjectId'], clnicID[0], context,
|
|
|
|
|
|
|
|
doctorId: null, doctorName: null, isNearest: true);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
goToClinic(clnicID);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
case '4':
|
|
|
|
case '4':
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Navigator.push(context, FadePage(page: LabsHomePage()));
|
|
|
|
Navigator.push(context, FadePage(page: LabsHomePage()));
|
|
|
|
@ -483,11 +482,193 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case '16':
|
|
|
|
case '16':
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Navigator.push(context, FadePage(page: MyBalancePage()));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case '17':
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Navigator.push(context, FadePage(page: MedicalProfilePage()));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case '18':
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
//Drivethrough need to be implemeted here.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case '19':
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Navigator.push(context, FadePage(page: LiveCareHome()));
|
|
|
|
Navigator.push(context, FadePage(page: LiveCareHome()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case '20':
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
//CMC service need to be implemeted
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case '21':
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Navigator.push(context, FadePage(page: MyFamily()));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case '22':
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Navigator.push(context, FadePage(page: BloodDonationPage()));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case '23':
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
//health calculator need to be implemeted
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case '24':
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Navigator.of(context).push(MaterialPageRoute(
|
|
|
|
|
|
|
|
builder: (BuildContext context) => MyWebView(
|
|
|
|
|
|
|
|
title: "HMG News",
|
|
|
|
|
|
|
|
selectedUrl:
|
|
|
|
|
|
|
|
"https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live",
|
|
|
|
|
|
|
|
)));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case '25':
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (user == null) {
|
|
|
|
|
|
|
|
Navigator.push(context, FadePage(page: WelcomeLogin()));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case '26':
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Navigator.push(context, FadePage(page: ParkingPage()));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case '27':
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Navigator.push(
|
|
|
|
|
|
|
|
context,
|
|
|
|
|
|
|
|
FadePage(
|
|
|
|
|
|
|
|
page: ErOptions(
|
|
|
|
|
|
|
|
isAppbar: true,
|
|
|
|
|
|
|
|
)));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case '28':
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Navigator.push(context, FadePage(page: AmbulanceReq()));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case '29':
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Navigator.push(context, FadePage(page: FindUsPage()));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case '30':
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
launch("tel://" + result['PhoneNumbers'][0]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case '31':
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Navigator.of(context).popUntil(ModalRoute.withName('/'));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case '32':
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Navigator.push(context, FadePage(page: AdvancePaymentPage()));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case '33':
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (result['LanguageCode'] != '0') {
|
|
|
|
|
|
|
|
if (projectProvider.isArabic) {
|
|
|
|
|
|
|
|
projectProvider.changeLanguage('en');
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
projectProvider.changeLanguage('ar');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case '34':
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
//settings page need to be implemented here
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case '35':
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (Platform.isIOS) {
|
|
|
|
|
|
|
|
launch(
|
|
|
|
|
|
|
|
"https://apps.apple.com/sa/app/dr-suliaman-alhabib/id733503978");
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
launch(
|
|
|
|
|
|
|
|
"https://play.google.com/store/apps/details?id=com.ejada.hmg&hl=en");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case '36':
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Navigator.of(context).pushNamed(
|
|
|
|
|
|
|
|
REGISTER,
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case '37':
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Navigator.of(context).pushNamed(
|
|
|
|
|
|
|
|
SYMPTOM_CHECKER,
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case '38':
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
await this.sharedPref.setInt(IS_SEARCH_APPO, 1);
|
|
|
|
|
|
|
|
Navigator.push(context, FadePage(page: MyAppointments()));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case '39':
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
await this.sharedPref.setInt(IS_SEARCH_APPO, 2);
|
|
|
|
|
|
|
|
Navigator.push(context, FadePage(page: MyAppointments()));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case '40':
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
//Home health care service need to be implemeted here
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case '41':
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Navigator.push(context, FadePage(page: PaymentService()));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case '42':
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
//weather indicator need to be implemented here
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case '43':
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
await this.sharedPref.setInt(IS_SEARCH_APPO, 3);
|
|
|
|
|
|
|
|
Navigator.push(context, FadePage(page: MyAppointments()));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case '44':
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
//chat need be implmented here.
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case '45':
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
launch('https://hmg.com/ir/ar/Pages/ShareInformation/home.aspx');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case '46':
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
launch('https://hmg.com/ir/ar/pages/home.aspx');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
case '200':
|
|
|
|
case '200':
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Navigator.push(context, FadePage(page: FeedbackHomePage()));
|
|
|
|
Navigator.push(context, FadePage(page: FeedbackHomePage()));
|
|
|
|
@ -499,8 +680,6 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
|
|
|
|
speak();
|
|
|
|
speak();
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//searchProvider.setLisener(result);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
getDoctorProfile(projectId, clinicId, doctorId, context, doctorData) {
|
|
|
|
getDoctorProfile(projectId, clinicId, doctorId, context, doctorData) {
|
|
|
|
@ -526,13 +705,14 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
getDoctorsList(projectId, clinicId, context, {doctorId, doctorName}) {
|
|
|
|
getDoctorsList(projectId, clinicId, context,
|
|
|
|
|
|
|
|
{doctorId, doctorName, isNearest = false}) {
|
|
|
|
List<DoctorList> doctorsList = [];
|
|
|
|
List<DoctorList> doctorsList = [];
|
|
|
|
List<String> arr = [];
|
|
|
|
List<String> arr = [];
|
|
|
|
List<String> arrDistance = [];
|
|
|
|
List<String> arrDistance = [];
|
|
|
|
DoctorsListService service = new DoctorsListService();
|
|
|
|
DoctorsListService service = new DoctorsListService();
|
|
|
|
service
|
|
|
|
service
|
|
|
|
.getDoctorsList(clinicId, projectId, false, context,
|
|
|
|
.getDoctorsList(clinicId, projectId, isNearest, context,
|
|
|
|
doctorId: doctorId, doctorName: doctorName)
|
|
|
|
doctorId: doctorId, doctorName: doctorName)
|
|
|
|
.then((res) {
|
|
|
|
.then((res) {
|
|
|
|
if (res['MessageStatus'] == 1) {
|
|
|
|
if (res['MessageStatus'] == 1) {
|
|
|
|
@ -648,4 +828,13 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
|
|
|
|
List unique(List list) {
|
|
|
|
List unique(List list) {
|
|
|
|
return list.toSet().toList();
|
|
|
|
return list.toSet().toList();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getUserData() async {
|
|
|
|
|
|
|
|
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
|
|
|
|
|
|
|
|
setState(() async {
|
|
|
|
|
|
|
|
user = AuthenticatedUser.fromJson(
|
|
|
|
|
|
|
|
await this.sharedPref.getObject(USER_PROFILE));
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|