-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
a: platform-viewsEmbedding Android/iOS views in Flutter appsEmbedding Android/iOS views in Flutter appspackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-iosiOS applications specificallyiOS applications specifically
Description
On iOS with GL rendering there's jank in the first frame a platform view is added, screen recording: https://photos.app.goo.gl/TUm6nSiENM2WT1ED6
The following minimal might help debugging with a simple layer tree:
class Glitch extends StatefulWidget {
@override
State<Glitch> createState() => GlitchState();
}
class GlitchState extends State<Glitch> {
bool showMap = false;
@override
Widget build(BuildContext context) {
return Column(
children: <Widget>[
Text('Hello'),
Container(
width: 300,
height: 300,
child: showMap ?
GoogleMap(
initialCameraPosition: CameraPosition(target: LatLng(0, 0)),
)
: null,
),
GestureDetector(
onTap: () {
setState(() {
showMap = !showMap;
});
},
child: Text('TOGGLE SHOW MAP'),
),
],
);
}
}The following engine patch prevents a second frame from being pumped right after a platform view is attached: amirh/engine@ee9ebb2
With that patch and the sample code above the bad frame remains stable on the screen, hopefully that makes debugging easier.
Metadata
Metadata
Assignees
Labels
a: platform-viewsEmbedding Android/iOS views in Flutter appsEmbedding Android/iOS views in Flutter appspackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-iosiOS applications specificallyiOS applications specifically