Closed
Description
Google3 app "Money" has reported a regression in Google Maps rendering behavior which they have narrowed down to Engine roll commit 9b0dc2b. The most likely actual Engine commit is flutter/engine#54231.
When navigating to and from a screen with a GoogleMap embedded in it, there are glitches where parts of the non-Map screen start flashing and getting stuck.
See videos on internal bug b/359381093 for more information.
Minimal repro app:
Minimal repro
Note: You need to set up a GoogleMaps API key to actually make this work.
import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData(useMaterial3: false),
title: 'Flutter Demo',
home: MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key? key, required this.title}) : super(key: key);
final String title;
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
void _pushAnotherPage() {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => Scaffold(
body: Container(
height: double.infinity,
width: double.infinity,
color: Colors.red,
child: Center(child: Text('Another page')),
),
),
),
);
}
@override
Widget build(BuildContext context) {
return Scaffold(
body: SafeArea(
child: GoogleMap(
initialCameraPosition: CameraPosition(
target: LatLng(1.3521, 103.8198),
zoom: 16,
),
),
),
floatingActionButton: FloatingActionButton(
onPressed: _pushAnotherPage,
tooltip: 'Increment',
child: const Icon(Icons.add),
),
);
}
}
This is a serious regression in a launched product, so we'd want to get a fix or rollback in ASAP and probably cherry-pick it into this app's next release.