This can be achieved by applying custom google map styles to your google map.
To create custom google map styling. Use this tool to generate a map_style.json
and save it in your assets folder. (Make sure it is referenced in pubspec.yaml aswell).
//this is the function to load custom map style json
void changeMapMode(GoogleMapController mapController) {
getJsonFile("assets/map_style.json")
.then((value) => setMapStyle(value, mapController));
}
//helper function
void setMapStyle(String mapStyle, GoogleMapController mapController) {
mapController.setMapStyle(mapStyle);
}
//helper function
Future<String> getJsonFile(String path) async {
ByteData byte = await rootBundle.load(path);
var list = byte.buffer.asUint8List(byte.offsetInBytes,byte.lengthInBytes);
return utf8.decode(list);
}
Implement it like this in your google map widget:
GoogleMap(
...
onMapCreated: (GoogleMapController c) {
yourMapController = c;
changeMapMode(yourMapController);
},
),