generateCustomMarker method

Future<Marker> generateCustomMarker({
  1. required String id,
  2. required LatLng position,
  3. required String title,
  4. 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));