Fix https://github.com/flutter/flutter/issues/138604 and https://github.com/flutter/flutter/issues/138671 Related PR https://github.com/flutter/engine/pull/45351 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style