|
|
|
|
@ -37,6 +37,8 @@ import 'package:geolocator/geolocator.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
|
|
|
|
|
|
import 'h2o/h2o_page.dart';
|
|
|
|
|
|
|
|
|
|
class AllHabibMedicalService extends StatefulWidget {
|
|
|
|
|
//TODO
|
|
|
|
|
final Function goToMyProfile;
|
|
|
|
|
@ -56,12 +58,8 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
|
|
|
|
|
@override
|
|
|
|
|
void initState() {
|
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
|
|
|
|
|
locationUtils =
|
|
|
|
|
new LocationUtils(isShowConfirmDialog: true, context: context);
|
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback((_) => {
|
|
|
|
|
Geolocator.getLastKnownPosition()
|
|
|
|
|
.then((value) => setLocation(value))
|
|
|
|
|
});
|
|
|
|
|
locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
|
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback((_) => {Geolocator.getLastKnownPosition().then((value) => setLocation(value))});
|
|
|
|
|
});
|
|
|
|
|
super.initState();
|
|
|
|
|
}
|
|
|
|
|
@ -100,8 +98,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Texts(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.healthWeatherIndicators,
|
|
|
|
|
TranslationBase.of(context).healthWeatherIndicators,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
),
|
|
|
|
|
@ -134,11 +131,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
|
|
|
|
|
width: 60,
|
|
|
|
|
height: 60,
|
|
|
|
|
),
|
|
|
|
|
Directionality(
|
|
|
|
|
textDirection: TextDirection.ltr,
|
|
|
|
|
child: AppText(weather,
|
|
|
|
|
fontSize: 22,
|
|
|
|
|
color: Colors.white))
|
|
|
|
|
Directionality(textDirection: TextDirection.ltr, child: AppText(weather, fontSize: 22, color: Colors.white))
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Texts(
|
|
|
|
|
@ -158,8 +151,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
widget.goToMyProfile();
|
|
|
|
|
},
|
|
|
|
|
imageLocation:
|
|
|
|
|
'assets/images/new-design/my_file_bottom_bar.png',
|
|
|
|
|
imageLocation: 'assets/images/new-design/my_file_bottom_bar.png',
|
|
|
|
|
title: TranslationBase.of(context).myMedicalFile,
|
|
|
|
|
),
|
|
|
|
|
ServicesContainer(
|
|
|
|
|
@ -181,8 +173,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
imageLocation:
|
|
|
|
|
'assets/images/new-design/booking_icon_active.png',
|
|
|
|
|
imageLocation: 'assets/images/new-design/booking_icon_active.png',
|
|
|
|
|
title: TranslationBase.of(context).bookAppo,
|
|
|
|
|
),
|
|
|
|
|
ServicesContainer(
|
|
|
|
|
@ -192,8 +183,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
|
|
|
|
|
page: PaymentService(),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
imageLocation:
|
|
|
|
|
'assets/images/al-habib_online_payment_service_icon.png',
|
|
|
|
|
imageLocation: 'assets/images/al-habib_online_payment_service_icon.png',
|
|
|
|
|
title: TranslationBase.of(context).onlinePaymentService,
|
|
|
|
|
),
|
|
|
|
|
ServicesContainer(
|
|
|
|
|
@ -201,8 +191,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
|
|
|
|
|
context,
|
|
|
|
|
FadePage(),
|
|
|
|
|
),
|
|
|
|
|
imageLocation:
|
|
|
|
|
'assets/images/al-habib_online_payment_service_icon.png',
|
|
|
|
|
imageLocation: 'assets/images/al-habib_online_payment_service_icon.png',
|
|
|
|
|
title: TranslationBase.of(context).covid19_driveThrueTest,
|
|
|
|
|
),
|
|
|
|
|
ServicesContainer(
|
|
|
|
|
@ -235,17 +224,13 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
|
|
|
|
|
page: InsuranceUpdate(),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
imageLocation:
|
|
|
|
|
'assets/images/medical/insurance_card_icon.png',
|
|
|
|
|
imageLocation: 'assets/images/medical/insurance_card_icon.png',
|
|
|
|
|
title: TranslationBase.of(context).updateInsurance,
|
|
|
|
|
),
|
|
|
|
|
ServicesContainer(
|
|
|
|
|
onTap: () => Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: authUser.patientID == null
|
|
|
|
|
? EReferralIndexPage()
|
|
|
|
|
: EReferralPage()),
|
|
|
|
|
FadePage(page: authUser.patientID == null ? EReferralIndexPage() : EReferralPage()),
|
|
|
|
|
),
|
|
|
|
|
imageLocation: 'assets/images/ereferral_service_icon.png',
|
|
|
|
|
title: TranslationBase.of(context).ereferral,
|
|
|
|
|
@ -257,20 +242,18 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
|
|
|
|
|
page: MyFamily(),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
imageLocation:
|
|
|
|
|
'assets/images/new-design/family_menu_icon_red.png',
|
|
|
|
|
imageLocation: 'assets/images/new-design/family_menu_icon_red.png',
|
|
|
|
|
title: TranslationBase.of(context).myFamily,
|
|
|
|
|
),
|
|
|
|
|
if(projectViewModel.havePrivilege(35))
|
|
|
|
|
ServicesContainer(
|
|
|
|
|
onTap: () => Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(page: ChildVaccinesPage()),
|
|
|
|
|
if (projectViewModel.havePrivilege(35))
|
|
|
|
|
ServicesContainer(
|
|
|
|
|
onTap: () => Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(page: ChildVaccinesPage()),
|
|
|
|
|
),
|
|
|
|
|
imageLocation: 'assets/images/new-design/children_vaccines_icon.png',
|
|
|
|
|
title: TranslationBase.of(context).childVaccine,
|
|
|
|
|
),
|
|
|
|
|
imageLocation:
|
|
|
|
|
'assets/images/new-design/children_vaccines_icon.png',
|
|
|
|
|
title: TranslationBase.of(context).childVaccine,
|
|
|
|
|
),
|
|
|
|
|
ServicesContainer(
|
|
|
|
|
onTap: () => Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
@ -278,27 +261,26 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
|
|
|
|
|
page: ToDo(isShowAppBar: true),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
imageLocation:
|
|
|
|
|
'assets/images/new-design/upcoming_icon_bottom_bar.png',
|
|
|
|
|
imageLocation: 'assets/images/new-design/upcoming_icon_bottom_bar.png',
|
|
|
|
|
title: TranslationBase.of(context).todoList,
|
|
|
|
|
),
|
|
|
|
|
if(projectViewModel.havePrivilege(42))
|
|
|
|
|
ServicesContainer(
|
|
|
|
|
onTap: () => Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(page: SymptomInfo()),
|
|
|
|
|
),
|
|
|
|
|
imageLocation: 'assets/images/new-design/body_icon.png',
|
|
|
|
|
title: TranslationBase.of(context).symptomCheckerTitle),
|
|
|
|
|
if(projectViewModel.havePrivilege(36))
|
|
|
|
|
if (projectViewModel.havePrivilege(42))
|
|
|
|
|
ServicesContainer(
|
|
|
|
|
onTap: () => Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(page: BloodDonationPage()),
|
|
|
|
|
onTap: () => Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(page: SymptomInfo()),
|
|
|
|
|
),
|
|
|
|
|
imageLocation: 'assets/images/new-design/body_icon.png',
|
|
|
|
|
title: TranslationBase.of(context).symptomCheckerTitle),
|
|
|
|
|
if (projectViewModel.havePrivilege(36))
|
|
|
|
|
ServicesContainer(
|
|
|
|
|
onTap: () => Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(page: BloodDonationPage()),
|
|
|
|
|
),
|
|
|
|
|
imageLocation: 'assets/images/new-design/blood_icon.png',
|
|
|
|
|
title: TranslationBase.of(context).bloodD,
|
|
|
|
|
),
|
|
|
|
|
imageLocation: 'assets/images/new-design/blood_icon.png',
|
|
|
|
|
title: TranslationBase.of(context).bloodD,
|
|
|
|
|
),
|
|
|
|
|
ServicesContainer(
|
|
|
|
|
onTap: () => Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
@ -306,8 +288,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
|
|
|
|
|
page: (HealthCalculators()),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
imageLocation:
|
|
|
|
|
'assets/images/new-design/health_calculator_icon.png',
|
|
|
|
|
imageLocation: 'assets/images/new-design/health_calculator_icon.png',
|
|
|
|
|
title: TranslationBase.of(context).calculators,
|
|
|
|
|
),
|
|
|
|
|
ServicesContainer(
|
|
|
|
|
@ -317,30 +298,30 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
|
|
|
|
|
page: HealthConverter(),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
imageLocation:
|
|
|
|
|
'assets/images/new-design/health_convertor_icon.png',
|
|
|
|
|
imageLocation: 'assets/images/new-design/health_convertor_icon.png',
|
|
|
|
|
title: TranslationBase.of(context).converters,
|
|
|
|
|
),
|
|
|
|
|
if(projectViewModel.havePrivilege(38))
|
|
|
|
|
ServicesContainer(
|
|
|
|
|
onTap: () => Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: H2OPageIndexPage(),
|
|
|
|
|
),
|
|
|
|
|
if (projectViewModel.havePrivilege(38))
|
|
|
|
|
ServicesContainer(
|
|
|
|
|
onTap: () => Navigator.push(context, FadePage(page: H2OPage())),
|
|
|
|
|
// Navigator.push(
|
|
|
|
|
// context,
|
|
|
|
|
// FadePage(
|
|
|
|
|
// page: H2OPageIndexPage(),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
imageLocation: 'assets/images/new-design/water_icon.png',
|
|
|
|
|
title: 'H2O',
|
|
|
|
|
),
|
|
|
|
|
imageLocation: 'assets/images/new-design/water_icon.png',
|
|
|
|
|
title: 'H2O',
|
|
|
|
|
),
|
|
|
|
|
if(projectViewModel.havePrivilege(41))
|
|
|
|
|
ServicesContainer(
|
|
|
|
|
onTap: () => Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(),
|
|
|
|
|
if (projectViewModel.havePrivilege(41))
|
|
|
|
|
ServicesContainer(
|
|
|
|
|
onTap: () => Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(),
|
|
|
|
|
),
|
|
|
|
|
imageLocation: 'assets/images/new-design/smartwatch_icon.png',
|
|
|
|
|
title: TranslationBase.of(context).smartWatches,
|
|
|
|
|
),
|
|
|
|
|
imageLocation: 'assets/images/new-design/smartwatch_icon.png',
|
|
|
|
|
title: TranslationBase.of(context).smartWatches,
|
|
|
|
|
),
|
|
|
|
|
ServicesContainer(
|
|
|
|
|
onTap: () => Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
@ -348,15 +329,12 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
|
|
|
|
|
page: ParkingPage(),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
imageLocation:
|
|
|
|
|
'assets/images/new-design/parking_system_icon.png',
|
|
|
|
|
imageLocation: 'assets/images/new-design/parking_system_icon.png',
|
|
|
|
|
title: TranslationBase.of(context).parking,
|
|
|
|
|
),
|
|
|
|
|
ServicesContainer(
|
|
|
|
|
onTap: () => launch(
|
|
|
|
|
"https://hmgwebservices.com/vt_mobile/html/index.html"),
|
|
|
|
|
imageLocation:
|
|
|
|
|
'assets/images/new-design/virtual_tour_icon.png',
|
|
|
|
|
onTap: () => launch("https://hmgwebservices.com/vt_mobile/html/index.html"),
|
|
|
|
|
imageLocation: 'assets/images/new-design/virtual_tour_icon.png',
|
|
|
|
|
title: TranslationBase.of(context).vTour,
|
|
|
|
|
),
|
|
|
|
|
ServicesContainer(
|
|
|
|
|
@ -364,12 +342,10 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
|
|
|
|
|
Navigator.of(context).push(MaterialPageRoute(
|
|
|
|
|
builder: (BuildContext context) => MyWebView(
|
|
|
|
|
title: "HMG News",
|
|
|
|
|
selectedUrl:
|
|
|
|
|
"https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live",
|
|
|
|
|
selectedUrl: "https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live",
|
|
|
|
|
)));
|
|
|
|
|
},
|
|
|
|
|
imageLocation:
|
|
|
|
|
'assets/images/new-design/twitter_dashboard_icon.png',
|
|
|
|
|
imageLocation: 'assets/images/new-design/twitter_dashboard_icon.png',
|
|
|
|
|
title: TranslationBase.of(context).latestNews,
|
|
|
|
|
),
|
|
|
|
|
ServicesContainer(
|
|
|
|
|
@ -392,8 +368,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
|
|
|
|
|
|
|
|
|
|
getAuthUser() async {
|
|
|
|
|
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
|
|
|
|
|
var data = AuthenticatedUser.fromJson(
|
|
|
|
|
await this.sharedPref.getObject(USER_PROFILE));
|
|
|
|
|
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
|
|
|
|
|
setState(() {
|
|
|
|
|
authUser = data;
|
|
|
|
|
});
|
|
|
|
|
@ -407,8 +382,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
setState(() {
|
|
|
|
|
weather =
|
|
|
|
|
data != null ? data['Temperature'].toString() + '\u2103' : '--';
|
|
|
|
|
weather = data != null ? data['Temperature'].toString() + '\u2103' : '--';
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|