|
|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
|
|
|
|
|
import 'dart:io';
|
|
|
|
|
|
|
|
|
|
import 'package:easy_localization/easy_localization.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
@ -7,12 +7,12 @@ import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/features/qr_parking/models/qr_parking_response_model.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
|
|
|
|
|
import 'package:map_launcher/map_launcher.dart';
|
|
|
|
|
import '../../features/qr_parking/qr_parking_view_model.dart';
|
|
|
|
|
import '../../theme/colors.dart';
|
|
|
|
|
import '../../widgets/appbar/app_bar_widget.dart';
|
|
|
|
|
import '../../widgets/buttons/custom_button.dart';
|
|
|
|
|
import '../../widgets/chip/app_custom_chip_widget.dart';
|
|
|
|
|
import 'package:maps_launcher/maps_launcher.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
import '../../widgets/routes/custom_page_route.dart';
|
|
|
|
|
|
|
|
|
|
@ -29,7 +29,7 @@ class ParkingSlot extends StatefulWidget {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class _ParkingSlotState extends State<ParkingSlot> {
|
|
|
|
|
void _openDirection() {
|
|
|
|
|
void _openDirection() async {
|
|
|
|
|
final lat = widget.model.latitude;
|
|
|
|
|
final lng = widget.model.longitude;
|
|
|
|
|
|
|
|
|
|
@ -48,7 +48,17 @@ class _ParkingSlotState extends State<ParkingSlot> {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
MapsLauncher.launchCoordinates(lat, lng);
|
|
|
|
|
await MapLauncher.showMarker(
|
|
|
|
|
mapType: MapType.google,
|
|
|
|
|
coords: Coords(lat, lng),
|
|
|
|
|
title: "Parking Location",
|
|
|
|
|
).catchError((err) {
|
|
|
|
|
MapLauncher.showMarker(
|
|
|
|
|
mapType: Platform.isIOS ? MapType.apple : MapType.google,
|
|
|
|
|
coords: Coords(lat, lng),
|
|
|
|
|
title: "Parking Location",
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|