Last active
December 3, 2018 17:39
-
-
Save kenzieschmoll/de1c0bfde07685c8f49994eeb7076483 to your computer and use it in GitHub Desktop.
maps sample - change the map appearance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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