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