Skip to content

Instantly share code, notes, and snippets.

@kenzieschmoll
Last active December 3, 2018 17:39
Show Gist options
  • Save kenzieschmoll/de1c0bfde07685c8f49994eeb7076483 to your computer and use it in GitHub Desktop.
Save kenzieschmoll/de1c0bfde07685c8f49994eeb7076483 to your computer and use it in GitHub Desktop.
maps sample - change the map appearance
MapType _currentMapType = MapType.normal;
void _onMapTypeButtonPressed() {
if (_currentMapType == MapType.normal) {
mapController.updateMapOptions(
GoogleMapOptions(mapType: MapType.satellite),
);
_currentMapType = MapType.satellite;
} else {
mapController.updateMapOptions(
GoogleMapOptions(mapType: MapType.normal),
);
_currentMapType = MapType.normal;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment