A Google map is displayed on the screen and the map style is updated with a dark theme when the map is created (onMapCreated)
The issue is a white blink when the style is changed and it is very visible due to the black theme transition. (Cf. video)
return GoogleMap(
myLocationButtonEnabled: false,
zoomGesturesEnabled: false,
scrollGesturesEnabled: true,
mapType: MapType.normal,
circles: circles,
markers: markers,
initialCameraPosition: cameraPosition,
onMapCreated: (GoogleMapController controller) {
_mapController = controller;
final currentMapStyle = (_themeType == ThemeType.dark)
? _darkMapStyle
: _normalMapStyle;
_mapController.setMapStyle(currentMapStyle);
},
);
}),