diff --git a/android/build.gradle b/android/build.gradle index bef6ad3c..a10c1dc7 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlin_version = '1.8.20' + ext.kotlin_version = '1.8.0' repositories { google() jcenter() diff --git a/lib/widgets/hospital_location.dart b/lib/widgets/hospital_location.dart index 998f8250..9f7e509f 100644 --- a/lib/widgets/hospital_location.dart +++ b/lib/widgets/hospital_location.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; @@ -41,7 +43,7 @@ class HospitalLocation extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - location!.locationName!.trim(), + location!.locationName!.trim(), style: TextStyle(fontSize: 16, letterSpacing: -0.64, fontWeight: FontWeight.w600, color: Color(0xff2E303A)), ), SizedBox(height: 10), @@ -81,13 +83,18 @@ class HospitalLocation extends StatelessWidget { mapType: MapType.google, coords: Coords(double.parse(location!.latitude!), double.parse(location!.longitude!)), title: location!.locationName!, - ); + ).catchError((err) { + MapLauncher.showMarker( + mapType: Platform.isIOS ? MapType.apple : MapType.google, + coords: Coords(double.parse(location!.latitude!), double.parse(location!.longitude!)), + title: location!.locationName!, + ); + }); }, ), SizedBox(height: 10), - contactButton(Icons.call, TranslationBase.of(context).callNow, () async{ - - await launchUrl(Uri.parse("tel://" + location!.phoneNumber.toString())); + contactButton(Icons.call, TranslationBase.of(context).callNow, () async { + await launchUrl(Uri.parse("tel://" + location!.phoneNumber.toString())); }), ], ), @@ -105,7 +112,6 @@ class HospitalLocation extends StatelessWidget { backgroundColor: Color(0xffF5F5F5), shape: StadiumBorder(side: BorderSide(color: Color(0xffF0F0F0), width: 1)), ), - onPressed: callback, icon: Icon( _iconData,