Google Maps

Hi
I want to create an uber like app, for which i want to create custom map with custom markers in google maps and tried custom widget but nothing is working. Kindly Help

@override
  void initState() {
    addCustomIcon();
    final _startCoordinate = latlng.LatLng(
      _originLatitude,
      _originLongitude,
    );
    _initialLocation = CameraPosition(
      target: _startCoordinate,
      zoom: 14,
    );

    super.initState();

    // setCustomMapPin();

    _getPolyline();
  }

  // void setCustomMapPin() async {
  //   pinLocationIcon = await BitmapDescriptor.fromAssetImage(
  //       ImageConfiguration(devicePixelRatio: 2.5),
  //       'assets/images/location_blue.png');
  //   setState(() {});
  // }

  void addCustomIcon() {
    BitmapDescriptor.fromAssetImage(
            const ImageConfiguration(size: Size(48, 48)),
            "assets/images/pass-img.png")
        .then(
      (icon) {
        print(icon);
        setState(() {
          markerIcon = icon;
        });
      },
    );
  }
1
2 replies