We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
div
1 parent 050f8a9 commit 2ca9b7eCopy full SHA for 2ca9b7e
packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart
@@ -43,7 +43,15 @@ class GoogleMapController {
43
44
ui.platformViewRegistry.registerViewFactory(
45
_getViewType(mapId),
46
- (int viewId) => _div,
+ (int viewId) => DivElement()
47
+ // Wrap the map div in a CSS reset for consistent styling.
48
+ // Having this on the map div itself seems to make it fail to render.
49
+ ..style.setProperty('all', 'initial')
50
+ // However, we do still need to set these to keep Flutter from logging a
51
+ // complaint.
52
+ ..style.width = '100%'
53
+ ..style.height = '100%'
54
+ ..children = <Element>[_div],
55
);
56
}
57
0 commit comments