fix(bugs):
fix(DeviceManagerScreen): show all devices when visibility=DELETED fix(MapScreen): cannot delete polylines when closing SnackBar on iOS
This commit is contained in:
@@ -16,13 +16,11 @@ showDirections(
|
||||
MapBloc mapBloc,
|
||||
String originalName,
|
||||
String destinationLocation,
|
||||
double devicelat,
|
||||
double devicelng,
|
||||
double deviceLat,
|
||||
double deviceLng,
|
||||
) {
|
||||
TextEditingController originController =
|
||||
TextEditingController(text: originalName);
|
||||
TextEditingController destinationController =
|
||||
TextEditingController(text: destinationLocation);
|
||||
TextEditingController originController = TextEditingController(text: originalName);
|
||||
TextEditingController destinationController = TextEditingController(text: destinationLocation);
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
backgroundColor: Theme.of(context).colorScheme.surface,
|
||||
@@ -44,15 +42,14 @@ showDirections(
|
||||
alignment: Alignment.centerRight,
|
||||
child: IconButton.outlined(
|
||||
onPressed: () async {
|
||||
await mapBloc.updateCameraPosition(
|
||||
controller,
|
||||
devicelat,
|
||||
devicelng,
|
||||
13.0,
|
||||
);
|
||||
// List<LatLng> polylineCoordinates = [];
|
||||
mapBloc.sinkPolylines.add([]);
|
||||
markers.clear();
|
||||
await mapBloc.updateCameraPosition(
|
||||
controller,
|
||||
deviceLat,
|
||||
deviceLng,
|
||||
13.0,
|
||||
);
|
||||
if (context.mounted) {
|
||||
ScaffoldMessenger.of(context).hideCurrentSnackBar();
|
||||
}
|
||||
@@ -103,10 +100,9 @@ showDirections(
|
||||
ScaffoldMessenger.of(context).hideCurrentSnackBar();
|
||||
List<LatLng> polylineCoordinates = [];
|
||||
mapBloc.sinkPolylines.add(polylineCoordinates);
|
||||
MapsLauncher.launchCoordinates(devicelat, devicelng);
|
||||
MapsLauncher.launchCoordinates(deviceLat, deviceLng);
|
||||
},
|
||||
icon: IconConstants.instance
|
||||
.getMaterialIcon(Icons.near_me_rounded),
|
||||
icon: IconConstants.instance.getMaterialIcon(Icons.near_me_rounded),
|
||||
label: Text(
|
||||
appLocalization(context).map_stream,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user