|
|
|
|
@ -6,6 +6,8 @@ import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
|
|
|
import 'package:maps_launcher/maps_launcher.dart';
|
|
|
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
|
import 'package:map_launcher/map_launcher.dart';
|
|
|
|
|
import 'dart:io' show Platform;
|
|
|
|
|
|
|
|
|
|
class pharmacyContactsPage extends StatefulWidget {
|
|
|
|
|
@override
|
|
|
|
|
@ -21,6 +23,7 @@ class _pharmacyContactsPageState extends State<pharmacyContactsPage> {
|
|
|
|
|
final whatsApp = "+966558434444";
|
|
|
|
|
final whatappURL_android = "whatsapp://send?phone=" + whatsApp;
|
|
|
|
|
final whatappURL_ios = "https://wa.me/$whatsApp";
|
|
|
|
|
final locationDescription = "Main Pharmacy OLAYA";
|
|
|
|
|
|
|
|
|
|
return AppScaffold(
|
|
|
|
|
appBarTitle: TranslationBase.of(context).contactUs,
|
|
|
|
|
@ -30,6 +33,7 @@ class _pharmacyContactsPageState extends State<pharmacyContactsPage> {
|
|
|
|
|
showPharmacyCart: false,
|
|
|
|
|
showHomeAppBarIcon: false,
|
|
|
|
|
isMainPharmacyPages: true,
|
|
|
|
|
isBottomBar: true,
|
|
|
|
|
body: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Card(
|
|
|
|
|
@ -143,10 +147,24 @@ class _pharmacyContactsPageState extends State<pharmacyContactsPage> {
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
MapsLauncher.launchCoordinates(
|
|
|
|
|
double.parse(latitude),
|
|
|
|
|
double.parse(longitude));
|
|
|
|
|
},
|
|
|
|
|
if (Platform.isIOS) { MapLauncher.showMarker(
|
|
|
|
|
mapType: MapType.apple,
|
|
|
|
|
coords: Coords(double.parse(latitude),
|
|
|
|
|
double.parse(longitude)),
|
|
|
|
|
title: locationDescription,);
|
|
|
|
|
} else { MapLauncher.showMarker(
|
|
|
|
|
mapType: MapType.google,
|
|
|
|
|
coords: Coords(double.parse(latitude),
|
|
|
|
|
double.parse(longitude)),
|
|
|
|
|
title: locationDescription,
|
|
|
|
|
// description: location.locationName,
|
|
|
|
|
); }
|
|
|
|
|
// MapsLauncher.launchCoordinates(double.parse(previousModel.productLocationService[index].latitude), double.parse(previousModel.productLocationService[index].longitude), previousModel.productLocationService[index].locationDescription);
|
|
|
|
|
},
|
|
|
|
|
// MapsLauncher.launchCoordinates(
|
|
|
|
|
// double.parse(latitude),
|
|
|
|
|
// double.parse(longitude));
|
|
|
|
|
// },
|
|
|
|
|
child: SvgPicture.asset(
|
|
|
|
|
'assets/images/pharmacy/location.svg',
|
|
|
|
|
width: 20,
|
|
|
|
|
@ -182,7 +200,7 @@ class _pharmacyContactsPageState extends State<pharmacyContactsPage> {
|
|
|
|
|
iconSize: 48,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
launch("https://facebook.com/HMG");
|
|
|
|
|
launch("https://facebook.com/HMG.pharmacy");
|
|
|
|
|
// launch("https://www.facebook.com/DrSulaimanAlHabib?ref=tn_tnmn");
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
@ -194,7 +212,7 @@ class _pharmacyContactsPageState extends State<pharmacyContactsPage> {
|
|
|
|
|
iconSize: 48,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
launch("https://twitter.com/HMG");
|
|
|
|
|
launch("https://twitter.com/HMG_pharmacy");
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
@ -205,7 +223,7 @@ class _pharmacyContactsPageState extends State<pharmacyContactsPage> {
|
|
|
|
|
iconSize: 48,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
launch("https://instagram.com/HMG");
|
|
|
|
|
launch("https://instagram.com/HMG_pharmacy");
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
|