|
|
|
|
@ -29,6 +29,7 @@ import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/theme/colors.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/location_util.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/dialogs/covid_consent_dialog.dart';
|
|
|
|
|
@ -47,6 +48,7 @@ class ServicesView extends StatelessWidget {
|
|
|
|
|
AuthenticatedUser authUser = new AuthenticatedUser();
|
|
|
|
|
AuthProvider authProvider = new AuthProvider();
|
|
|
|
|
PharmacyModuleViewModel pharmacyModuleViewModel = locator<PharmacyModuleViewModel>();
|
|
|
|
|
LocationUtils locationUtils;
|
|
|
|
|
|
|
|
|
|
ServicesView(this.hmgServices, this.index);
|
|
|
|
|
|
|
|
|
|
@ -55,10 +57,7 @@ class ServicesView extends StatelessWidget {
|
|
|
|
|
return InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
if (index == 0) {
|
|
|
|
|
locator<GAnalytics>().hmgServices.logServiceName('live care service');
|
|
|
|
|
Navigator.push(context, FadePage(page: LiveCareHome())).then((value) {
|
|
|
|
|
LiveCareHome.isLiveCareTypeSelected = false;
|
|
|
|
|
});
|
|
|
|
|
openLiveCare(context);
|
|
|
|
|
} else if (index == 1) {
|
|
|
|
|
showCovidDialog(context);
|
|
|
|
|
locator<GAnalytics>().hmgServices.logServiceName('covid-test drive-thru');
|
|
|
|
|
@ -296,6 +295,17 @@ class ServicesView extends StatelessWidget {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
openLiveCare(BuildContext context) {
|
|
|
|
|
locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
|
|
|
|
|
locationUtils.getCurrentLocation(callBack: (value) {
|
|
|
|
|
print(value);
|
|
|
|
|
locator<GAnalytics>().hmgServices.logServiceName('live care service');
|
|
|
|
|
Navigator.push(context, FadePage(page: LiveCareHome())).then((value) {
|
|
|
|
|
LiveCareHome.isLiveCareTypeSelected = false;
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getPharmacyToken(BuildContext context) async {
|
|
|
|
|
if (!authProvider.isLogin) {
|
|
|
|
|
Navigator.push(context, FadePage(page: LandingPagePharmacy()));
|
|
|
|
|
|