Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Documentation error #13

Closed
MartinJLee opened this issue May 23, 2020 · 1 comment
Closed

Documentation error #13

MartinJLee opened this issue May 23, 2020 · 1 comment

Comments

@MartinJLee
Copy link

https://codelabs.developers.google.com/codelabs/google-maps-in-flutter/#5

_markers[office.name] = marker;
// should be
setState(() {
  _markers[office.name] = marker;
});
@domesticmouse
Copy link
Contributor

Err, the whole block is inside a setState:

    setState(() {
      _markers.clear();
      for (final office in googleOffices.offices) {
        final marker = Marker(
          markerId: MarkerId(office.name),
          position: LatLng(office.lat, office.lng),
          infoWindow: InfoWindow(
            title: office.name,
            snippet: office.address,
          ),
        );
        _markers[office.name] = marker;
      }
    });

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants