generateCustomMarker method
Future<Marker>
generateCustomMarker(
{ - required String id,
- required LatLng position,
- required String title,
- required String subtitle,
})
Implementation
Future<Marker> generateCustomMarker(
{required String id,
required LatLng position,
required String title,
required String subtitle}) async =>
id == 'start'
? Marker(
markerId: MarkerId(id),
position: position,
infoWindow: InfoWindow(title: '$title Min', snippet: subtitle),
anchor: const Offset(0.07, 0.85),
icon: await getStartCustomMarker(title, subtitle))
: Marker(
markerId: MarkerId(id),
position: position,
infoWindow: InfoWindow(title: '$title Km', snippet: subtitle),
icon: await getEndCustomMarker(title, subtitle));