|
|
|
|
@ -10,7 +10,7 @@ import 'avatar/large_avatar.dart';
|
|
|
|
|
import 'my_rich_text.dart';
|
|
|
|
|
|
|
|
|
|
class HospitalLocation extends StatelessWidget {
|
|
|
|
|
final GetHMGLocationsModel location;
|
|
|
|
|
final GetHMGLocationsModel? location;
|
|
|
|
|
final bool showCity;
|
|
|
|
|
final String? waitingTime;
|
|
|
|
|
|
|
|
|
|
@ -41,7 +41,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),
|
|
|
|
|
@ -60,8 +60,8 @@ class HospitalLocation extends StatelessWidget {
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
if (showCity) MyRichText(TranslationBase.of(context).city + ":", location.cityName!.trim().toString(), projectViewModel.isArabic),
|
|
|
|
|
MyRichText(TranslationBase.of(context).distance + ":", location.distanceInKilometers.toString() + " " + TranslationBase.of(context).km_ ?? "", projectViewModel.isArabic),
|
|
|
|
|
if (showCity) MyRichText(TranslationBase.of(context).city + ":", location!.cityName!.trim().toString(), projectViewModel.isArabic),
|
|
|
|
|
MyRichText(TranslationBase.of(context).distance + ":", location!.distanceInKilometers.toString() + " " + TranslationBase.of(context).km_ ?? "", projectViewModel.isArabic),
|
|
|
|
|
if (waitingTime != null) MyRichText(TranslationBase.of(context).waitingTime, waitingTime!, projectViewModel.isArabic),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
@ -79,14 +79,15 @@ class HospitalLocation extends StatelessWidget {
|
|
|
|
|
() async {
|
|
|
|
|
await MapLauncher.showMarker(
|
|
|
|
|
mapType: MapType.google,
|
|
|
|
|
coords: Coords(double.parse(location.latitude!), double.parse(location.longitude!)),
|
|
|
|
|
title: location.locationName!,
|
|
|
|
|
coords: Coords(double.parse(location!.latitude!), double.parse(location!.longitude!)),
|
|
|
|
|
title: location!.locationName!,
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 10),
|
|
|
|
|
contactButton(Icons.call, TranslationBase.of(context).callNow, () {
|
|
|
|
|
launchUrl(Uri.parse("tel://" + location.phoneNumber!));
|
|
|
|
|
contactButton(Icons.call, TranslationBase.of(context).callNow, () async{
|
|
|
|
|
|
|
|
|
|
await launchUrl(Uri.parse("tel://" + location!.phoneNumber.toString()));
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
|