Merge branch 'development_new_design_2.0' into haroon-new-design

# Conflicts:
#	lib/pages/pharmacies/screens/product-details/availability_info.dart
merge-update-with-lab-changes
haroon amjad 4 years ago
commit bb9aaf9945

@ -94,21 +94,13 @@
<false/> <false/>
<key>io.flutter.embedded_views_preview</key> <key>io.flutter.embedded_views_preview</key>
<true/> <true/>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>comgooglemaps</string>
<string>baidumap</string>
<string>iosamap</string>
</array>
</dict> </dict>
</plist> </plist>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>comgooglemaps</string>
<string>baidumap</string>
<string>iosamap</string>
<string>waze</string>
<string>yandexmaps</string>
<string>yandexnavi</string>
<string>citymapper</string>
<string>mapswithme</string>
<string>osmandmaps</string>
<string>dgis</string>
<string>qqmap</string>
<string>here-location</string>
</array>

@ -1,8 +1,10 @@
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/product_detail_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/product_detail_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:map_launcher/map_launcher.dart'; import 'package:maps_launcher/maps_launcher.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
import 'package:map_launcher/map_launcher.dart';
import 'dart:io' show Platform;
class AvailabilityInfo extends StatelessWidget { class AvailabilityInfo extends StatelessWidget {
final ProductDetailViewModel previousModel; final ProductDetailViewModel previousModel;
@ -20,8 +22,8 @@ class AvailabilityInfo extends StatelessWidget {
), ),
) )
: Container( : Container(
margin: EdgeInsets.only(bottom: 40), margin: EdgeInsets.only(bottom: 40),
child: ListView.builder( child: ListView.builder(
physics: ScrollPhysics(), physics: ScrollPhysics(),
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
shrinkWrap: true, shrinkWrap: true,
@ -54,15 +56,19 @@ class AvailabilityInfo extends StatelessWidget {
icon: Icon(Icons.location_on), icon: Icon(Icons.location_on),
color: Colors.red, color: Colors.red,
onPressed: () { onPressed: () {
MapLauncher.showMarker( if (Platform.isIOS) { MapLauncher.showMarker(
mapType: MapType.googleGo, mapType: MapType.apple,
coords: Coords(double.parse(previousModel.productLocationService[index].latitude), double.parse(previousModel.productLocationService[index].longitude)), coords: Coords(double.parse(previousModel.productLocationService[index].latitude),
title: previousModel.productLocationService[index].locationDescription, double.parse(previousModel.productLocationService[index].longitude)),
// description: location.locationName, title: previousModel.productLocationService[index].locationDescription,);
).then((value) {}).catchError((err) { } else { MapLauncher.showMarker(
print(err); mapType: MapType.google,
}); coords: Coords(double.parse(previousModel.productLocationService[index].latitude),
// MapLauncher.launchCoordinates(double.parse(previousModel.productLocationService[index].latitude), double.parse(previousModel.productLocationService[index].longitude), previousModel.productLocationService[index].locationDescription); double.parse(previousModel.productLocationService[index].longitude)),
title: previousModel.productLocationService[index].locationDescription,
// description: location.locationName,
); }
// MapsLauncher.launchCoordinates(double.parse(previousModel.productLocationService[index].latitude), double.parse(previousModel.productLocationService[index].longitude), previousModel.productLocationService[index].locationDescription);
}, },
), ),
), ),
@ -84,7 +90,7 @@ class AvailabilityInfo extends StatelessWidget {
); );
}, },
), ),
); );
} }
convertCityName(txt) { convertCityName(txt) {

@ -77,14 +77,19 @@ class HospitalLocation extends StatelessWidget {
Column( Column(
children: [ children: [
contactButton(Icons.location_on, TranslationBase.of(context).locationa, () { contactButton(Icons.location_on, TranslationBase.of(context).locationa, () {
// MapsLauncher.launchCoordinates(double.parse(location.latitude), double.parse(location.longitude), location.locationName); // MapsLauncher.launchCoordinates(double.parse(location.latitude), double.parse(location.longitude), location.locationName);
MapLauncher.showMarker( if (Platform.isIOS) { MapLauncher.showMarker(
mapType: MapType.google, // mapType: MapType.google,
mapType: MapType.apple,
coords: Coords(double.parse(location.latitude), double.parse(location.longitude)), coords: Coords(double.parse(location.latitude), double.parse(location.longitude)),
title: location.locationName, title: location.locationName,);
// description: location.locationName, } else { MapLauncher.showMarker(
); mapType: MapType.google,
}), coords: Coords(double.parse(location.latitude), double.parse(location.longitude)),
title: location.locationName,
// description: location.locationName,
); }}
),
SizedBox(height: 10), SizedBox(height: 10),
contactButton(Icons.call, TranslationBase.of(context).callNow, () { contactButton(Icons.call, TranslationBase.of(context).callNow, () {
launch("tel://" + location.phoneNumber); launch("tel://" + location.phoneNumber);
@ -118,5 +123,4 @@ class HospitalLocation extends StatelessWidget {
} }
} }

Loading…
Cancel
Save