7 #include "flutter/fml/logging.h"
14 - (UIWindowScene*)flutterWindowSceneIfViewLoaded {
15 if (
self.viewIfLoaded == nil) {
16 FML_LOG(WARNING) <<
"Trying to access the window scene before the view is loaded.";
19 return self.viewIfLoaded.window.windowScene;
22 - (UIScreen*)flutterScreenIfViewLoaded {
23 if (@available(iOS 13.0, *)) {
24 if (
self.viewIfLoaded == nil) {
25 FML_LOG(WARNING) <<
"Trying to access the screen before the view is loaded.";
28 return [
self flutterWindowSceneIfViewLoaded].screen;
30 return UIScreen.mainScreen;