5#import "flutter/shell/platform/darwin/ios/framework/Source/UIViewController+FlutterScreenAndSceneIfLoaded.h"
7#include "flutter/fml/logging.h"
8#import "flutter/shell/platform/darwin/common/framework/Headers/FlutterMacros.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;
#define FML_LOG(severity)