Answers for "google maps flutter maps style"

0

google maps flutter maps style

final Completer<GoogleMapController> _mapController = Completer();

....
...

Future<void> _onMapCreated(GoogleMapController controller) async {
    _mapController.complete(controller);
    String value = await DefaultAssetBundle.of(context)
        .loadString('assets/images/mapstyle.json');
    var t = await _mapController.future;
    t.setMapStyle(value);
  }
Posted by: Guest on March-07-2022

Code answers related to "Dart"

Browse Popular Code Answers by Language