Closed
Description
Bug report
(Android only. iOS seems fine)
I've got a screen containing a Platform view widget (Google Maps and/or WebView)
As soon as the Adwidget is displayed (=once the load method is called), the others platform views freeze = i can not interact/scroll inside them anymore.
Steps to reproduce
Steps to reproduce the behavior:
Use those packages:
google_maps_flutter: ^1.2.0
google_mobile_ads: ^0.11.0+1
webview_flutter: ^1.0.7
Use this code :
import 'package:google_mobile_ads/google_mobile_ads.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:webview_flutter/webview_flutter.dart';
import 'ad_state.dart';
class AdPage extends StatefulWidget {
AdPage({Key key}) : super(key: key);
@override
_AdPageState createState() => _AdPageState();
}
class _AdPageState extends State<AdPage> {
BannerAd banner;
bool isLoading = false;
@override
void initState() {
super.initState();
banner = BannerAd(
adUnitId: BannerAd.testAdUnitId,
size: AdSize.banner,
request: AdRequest(),
listener: AdState.adListener,
); //..load();
Future<void>.delayed(
Duration(seconds: 15),
() => setState(() {
banner?.load();
isLoading = true;
}));
}
@override
Widget build(BuildContext context) {
return Column(
children: [
Container(
height: 300,
child: WebView(
javascriptMode: JavascriptMode.unrestricted,
initialUrl: "https://www.flutter.dev",
),
),
Container(
height: 300,
child: GoogleMap(
initialCameraPosition:
CameraPosition(target: LatLng(46.0, -0.36), zoom: 15.0)),
),
Container(
height: 50,
child: isLoading ? AdWidget(ad: banner) : null,
),
],
);
}
}
Flutter doctor
Run flutter doctor
and paste the output below:
Click To Expand
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.22.6, on Mac OS X 10.15.7 19H15 darwin-x64, locale fr-FR)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 12.4)
[!] Android Studio (version 4.1)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[!] VS Code (version 1.53.1)
✗ Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected device (1 available)
! Doctor found issues in 2 categories.
Flutter dependencies
Run flutter pub deps -- --style=compact
and paste the output below:
Click To Expand
Dart SDK 2.10.5
Flutter SDK 1.22.6
google_mobile_ads_bug 1.0.0+1
dependencies:
- cupertino_icons 1.0.0
- flutter 0.0.0 [characters collection meta typed_data vector_math sky_engine]
- google_maps_flutter 1.2.0 [flutter flutter_plugin_android_lifecycle google_maps_flutter_platform_interface]
- google_mobile_ads 0.11.0+1 [meta flutter]
- provider 4.3.3 [collection flutter nested]
- webview_flutter 1.0.7 [flutter]
dev dependencies:
- flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher meta source_span stream_channel string_scanner term_glyph typed_data]
transitive dependencies:
- async 2.5.0-nullsafety.1 [collection]
- boolean_selector 2.1.0-nullsafety.1 [source_span string_scanner]
- characters 1.1.0-nullsafety.3
- charcode 1.2.0-nullsafety.1
- clock 1.1.0-nullsafety.1
- collection 1.15.0-nullsafety.3
- fake_async 1.2.0-nullsafety.1 [clock collection]
- flutter_plugin_android_lifecycle 1.0.11 [flutter]
- google_maps_flutter_platform_interface 1.2.0 [flutter meta plugin_platform_interface stream_transform collection]
- matcher 0.12.10-nullsafety.1 [stack_trace]
- meta 1.3.0-nullsafety.3
- nested 0.0.4 [flutter]
- path 1.8.0-nullsafety.1
- plugin_platform_interface 1.0.3 [meta]
- sky_engine 0.0.99
- source_span 1.8.0-nullsafety.2 [charcode collection path term_glyph]
- stack_trace 1.10.0-nullsafety.1 [path]
- stream_channel 2.1.0-nullsafety.1 [async]
- stream_transform 1.2.0
- string_scanner 1.1.0-nullsafety.1 [charcode source_span]
- term_glyph 1.2.0-nullsafety.1
- test_api 0.2.19-nullsafety.2 [async boolean_selector collection meta path source_span stack_trace stream_channel string_scanner term_glyph matcher]
- typed_data 1.3.0-nullsafety.3 [collection]
- vector_math 2.1.0-nullsafety.3