File tree 2 files changed +13
-12
lines changed
packages/google_maps_flutter/google_maps_flutter/example 2 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -414,19 +414,18 @@ void runTests() {
414
414
final Completer <int > mapIdCompleter = Completer <int >();
415
415
final Key key = GlobalKey ();
416
416
417
- await tester.pumpWidget (
418
- Directionality (
419
- textDirection: TextDirection .ltr,
420
- child: GoogleMap (
421
- key: key,
422
- initialCameraPosition: kInitialCameraPosition,
423
- onMapCreated: (GoogleMapController controller) {
424
- mapIdCompleter.complete (controller.mapId);
425
- },
426
- cloudMapId: kCloudMapId,
427
- ),
417
+ await pumpMap (
418
+ tester,
419
+ GoogleMap (
420
+ key: key,
421
+ initialCameraPosition: kInitialCameraPosition,
422
+ onMapCreated: (GoogleMapController controller) {
423
+ mapIdCompleter.complete (controller.mapId);
424
+ },
425
+ cloudMapId: kCloudMapId,
428
426
),
429
427
);
428
+ await tester.pumpAndSettle ();
430
429
431
430
// Await mapIdCompleter to finish to make sure map can be created with cloudMapId
432
431
await mapIdCompleter.future;
Original file line number Diff line number Diff line change 6
6
7
7
import 'dart:io' ;
8
8
9
+ import 'package:flutter/foundation.dart' ;
9
10
import 'package:flutter/material.dart' ;
10
11
import 'package:google_maps_flutter/google_maps_flutter.dart' ;
11
12
import 'package:google_maps_flutter_android/google_maps_flutter_android.dart' ;
@@ -108,7 +109,8 @@ class MapIdBodyState extends State<MapIdBody> {
108
109
'Press to use specified map Id' ,
109
110
),
110
111
)),
111
- if (Platform .isAndroid &&
112
+ if (! kIsWeb &&
113
+ Platform .isAndroid &&
112
114
_initializedRenderer != AndroidMapRenderer .latest)
113
115
Padding (
114
116
padding: const EdgeInsets .all (10.0 ),
You can’t perform that action at this time.
0 commit comments