Closed
Description
This code is not the right way to get the window containing a Flutter view in a plugin; there is no guarantee that a) there is a key window, or b) that the key window is the window with the Flutter view.
Instead, plugins should get the window
of the view
returned by the plugin registrar. See file_selector
for an example of reliably getting the correct window.