File tree Expand file tree Collapse file tree
packages/google_maps_flutter/google_maps_flutter_web
example/latest/integration_test Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1147,7 +1147,7 @@ void main() {
11471147 await tester.pumpAndSettle ();
11481148
11491149 expect (myLocationController.myLocationButton, isNull);
1150- expect (map.controls[ gmaps.ControlPosition .RIGHT_BOTTOM as int ] .length, equals (0 ));
1150+ expect (map.getControlsAt ( gmaps.ControlPosition .RIGHT_BOTTOM ) .length, equals (0 ));
11511151 });
11521152
11531153 testWidgets ('initializes with my location & display my location button' , (
@@ -1182,7 +1182,7 @@ void main() {
11821182 controller.init ();
11831183 await tester.pumpAndSettle ();
11841184
1185- expect (map.controls[ gmaps.ControlPosition .RIGHT_BOTTOM as int ] .length, equals (1 ));
1185+ expect (map.getControlsAt ( gmaps.ControlPosition .RIGHT_BOTTOM ) .length, equals (1 ));
11861186 });
11871187
11881188 testWidgets ('initializes with my location only' , (WidgetTester tester) async {
@@ -1215,7 +1215,7 @@ void main() {
12151215 controller.init ();
12161216 await tester.pumpAndSettle ();
12171217
1218- expect (map.controls[ gmaps.ControlPosition .RIGHT_BOTTOM as int ] .length, equals (0 ));
1218+ expect (map.getControlsAt ( gmaps.ControlPosition .RIGHT_BOTTOM ) .length, equals (0 ));
12191219 });
12201220 });
12211221 });
Original file line number Diff line number Diff line change @@ -125,14 +125,14 @@ class MyLocationController {
125125 }.toJS,
126126 );
127127 if (myLocationButton != null ) {
128- map.controls[ gmaps.ControlPosition .RIGHT_BOTTOM as int ] .push (myLocationButton! .getButton);
128+ map.getControlsAt ( gmaps.ControlPosition .RIGHT_BOTTOM ) .push (myLocationButton! .getButton);
129129 }
130130 }
131131
132132 /// Remove my location button from map
133133 void removeMyLocationButton (gmaps.Map map) {
134134 if (myLocationButton != null ) {
135- map.controls[ gmaps.ControlPosition .RIGHT_BOTTOM as int ] .pop ();
135+ map.getControlsAt ( gmaps.ControlPosition .RIGHT_BOTTOM ) .pop ();
136136 myLocationButton = null ;
137137 }
138138 _dragEndListener? .remove ();
You can’t perform that action at this time.
0 commit comments