12@implementation UIViewController (FlutterScreenAndSceneIfLoaded)
14- (UIWindowScene*)flutterWindowSceneIfViewLoaded {
15 if (
self.viewIfLoaded == nil) {
16 [FlutterLogger logWarning:@"Trying to access the window scene before the view is loaded."];
19 return self.viewIfLoaded.window.windowScene;
23 if (
self.viewIfLoaded == nil) {
24 [FlutterLogger logWarning:@"Trying to access the screen before the view is loaded."];
27 return [
self flutterWindowSceneIfViewLoaded].screen;