Closed hisaichi5518 closed 4 years ago
~When I used a beta channel of flutter, it doesn't reproduce it anymore.~
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v1.17.0, on Mac OS X 10.15.4 19E287, locale ja-JP)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.1)
[✓] Android Studio (version 3.6)
[✓] IntelliJ IDEA Ultimate Edition (version 2019.3.4)
[✓] VS Code (version 1.42.0)
[✓] Connected device (2 available)
• No issues found!
It seems to be a problem with the VirtualDisplay that PlatformView is using. https://github.com/flutter/flutter/issues/39797 https://github.com/flutter/flutter/issues/39797#issuecomment-598345787
reproducible code:
import 'package:flutter/material.dart';
import 'package:native_webview/native_webview.dart';
class InitialUrlScreen extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return InitialUrlScreenState();
}
}
class InitialUrlScreenState extends State {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Initial URL"),
),
body: Column(
children: <Widget>[
SizedBox(
height: 200,
child: WebView(
initialUrl: "https://flutter.dev",
),
),
SizedBox(
height: 200,
child: WebView(
initialUrl: "https://flutter.dev",
),
),
],
),
);
}
}