|
|
|
|
@ -58,8 +58,12 @@ 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();
|
|
|
|
|
}
|
|
|
|
|
@ -98,12 +102,14 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Texts(
|
|
|
|
|
TranslationBase.of(context).healthWeatherIndicators,
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.healthWeatherIndicators,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
),
|
|
|
|
|
Texts(
|
|
|
|
|
TranslationBase.of(context).healthTipsBasedOnCurrentWeather,
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.healthTipsBasedOnCurrentWeather,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
),
|
|
|
|
|
@ -131,7 +137,11 @@ 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(
|
|
|
|
|
@ -151,7 +161,8 @@ 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(
|
|
|
|
|
@ -173,7 +184,8 @@ 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(
|
|
|
|
|
@ -183,15 +195,28 @@ 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(
|
|
|
|
|
onTap: () => Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: PaymentService(),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
imageLocation:
|
|
|
|
|
'assets/images/comprehensive_medical_checkup_logo.png',
|
|
|
|
|
title: TranslationBase.of(context).anicllaryOrders,
|
|
|
|
|
),
|
|
|
|
|
ServicesContainer(
|
|
|
|
|
onTap: () => Navigator.push(
|
|
|
|
|
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(
|
|
|
|
|
@ -224,13 +249,17 @@ 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,
|
|
|
|
|
@ -242,7 +271,8 @@ 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))
|
|
|
|
|
@ -251,7 +281,8 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
|
|
|
|
|
context,
|
|
|
|
|
FadePage(page: ChildVaccinesPage()),
|
|
|
|
|
),
|
|
|
|
|
imageLocation: 'assets/images/new-design/children_vaccines_icon.png',
|
|
|
|
|
imageLocation:
|
|
|
|
|
'assets/images/new-design/children_vaccines_icon.png',
|
|
|
|
|
title: TranslationBase.of(context).childVaccine,
|
|
|
|
|
),
|
|
|
|
|
ServicesContainer(
|
|
|
|
|
@ -261,7 +292,8 @@ 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))
|
|
|
|
|
@ -288,7 +320,8 @@ 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(
|
|
|
|
|
@ -298,12 +331,14 @@ 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: H2OPage())),
|
|
|
|
|
onTap: () =>
|
|
|
|
|
Navigator.push(context, FadePage(page: H2OPage())),
|
|
|
|
|
// Navigator.push(
|
|
|
|
|
// context,
|
|
|
|
|
// FadePage(
|
|
|
|
|
@ -319,7 +354,8 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
|
|
|
|
|
context,
|
|
|
|
|
FadePage(),
|
|
|
|
|
),
|
|
|
|
|
imageLocation: 'assets/images/new-design/smartwatch_icon.png',
|
|
|
|
|
imageLocation:
|
|
|
|
|
'assets/images/new-design/smartwatch_icon.png',
|
|
|
|
|
title: TranslationBase.of(context).smartWatches,
|
|
|
|
|
),
|
|
|
|
|
ServicesContainer(
|
|
|
|
|
@ -329,12 +365,15 @@ 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(
|
|
|
|
|
@ -342,10 +381,12 @@ 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(
|
|
|
|
|
@ -368,7 +409,8 @@ 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;
|
|
|
|
|
});
|
|
|
|
|
@ -382,7 +424,8 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
setState(() {
|
|
|
|
|
weather = data != null ? data['Temperature'].toString() + '\u2103' : '--';
|
|
|
|
|
weather =
|
|
|
|
|
data != null ? data['Temperature'].toString() + '\u2103' : '--';
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|