dev_v3.13.6_BLE_Faiz
haroon amjad 2 years ago
parent 5e9d08b9aa
commit 3dffb26aee

@ -1,5 +1,5 @@
buildscript { buildscript {
ext.kotlin_version = '1.8.20' ext.kotlin_version = '1.8.0'
repositories { repositories {
google() google()
jcenter() jcenter()

@ -1,3 +1,5 @@
import 'dart:io';
import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart'; import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -41,7 +43,7 @@ class HospitalLocation extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Text(
location!.locationName!.trim(), location!.locationName!.trim(),
style: TextStyle(fontSize: 16, letterSpacing: -0.64, fontWeight: FontWeight.w600, color: Color(0xff2E303A)), style: TextStyle(fontSize: 16, letterSpacing: -0.64, fontWeight: FontWeight.w600, color: Color(0xff2E303A)),
), ),
SizedBox(height: 10), SizedBox(height: 10),
@ -81,13 +83,18 @@ class HospitalLocation extends StatelessWidget {
mapType: MapType.google, mapType: MapType.google,
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!,
); ).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), SizedBox(height: 10),
contactButton(Icons.call, TranslationBase.of(context).callNow, () async{ contactButton(Icons.call, TranslationBase.of(context).callNow, () async {
await launchUrl(Uri.parse("tel://" + location!.phoneNumber.toString()));
await launchUrl(Uri.parse("tel://" + location!.phoneNumber.toString()));
}), }),
], ],
), ),
@ -105,7 +112,6 @@ class HospitalLocation extends StatelessWidget {
backgroundColor: Color(0xffF5F5F5), backgroundColor: Color(0xffF5F5F5),
shape: StadiumBorder(side: BorderSide(color: Color(0xffF0F0F0), width: 1)), shape: StadiumBorder(side: BorderSide(color: Color(0xffF0F0F0), width: 1)),
), ),
onPressed: callback, onPressed: callback,
icon: Icon( icon: Icon(
_iconData, _iconData,

Loading…
Cancel
Save