Flutter iOS Embedder
FlutterViewController_Internal.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERVIEWCONTROLLER_INTERNAL_H_
6 #define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERVIEWCONTROLLER_INTERNAL_H_
7 
9 
10 #import "flutter/shell/platform/darwin/ios/InternalFlutterSwift/InternalFlutterSwift.h"
17 
18 namespace flutter {
19 class PlatformViewsController;
20 }
21 
23 // NOLINTNEXTLINE(readability-identifier-naming)
24 extern NSNotificationName const FlutterViewControllerWillDealloc;
25 
27 // NOLINTNEXTLINE(readability-identifier-naming)
28 extern NSNotificationName const FlutterViewControllerHideHomeIndicator;
29 
31 // NOLINTNEXTLINE(readability-identifier-naming)
32 extern NSNotificationName const FlutterViewControllerShowHomeIndicator;
33 
35 
36 @property(nonatomic, readonly) BOOL isPresentingViewController;
37 @property(nonatomic, readonly) BOOL isVoiceOverRunning;
38 @property(nonatomic, strong) FlutterKeyboardManager* keyboardManager;
39 @property(nonatomic, strong) id<FlutterKeyboardInsetManagerProtocol> keyboardInsetManager;
40 @property(nonatomic, readwrite) NSString* applicationLocale;
41 
42 /**
43  * @brief Whether the status bar is preferred hidden.
44  *
45  * This overrides the |UIViewController:prefersStatusBarHidden|.
46  * This is ignored when `UIViewControllerBasedStatusBarAppearance` in info.plist
47  * of the app project is `false`.
48  */
49 @property(nonatomic, assign, readwrite) BOOL prefersStatusBarHidden;
50 
51 @property(nonatomic, readonly) FlutterPlatformViewsController* platformViewsController;
52 
53 @property(nonatomic, strong) FlutterAccessibilityFeatures* accessibilityFeatures;
54 
55 @property(nonatomic, strong) FlutterDisplayLinkManager* displayLinkManager;
56 
57 - (FlutterRestorationPlugin*)restorationPlugin;
59 
60 // Accepts keypress events, and then calls |nextAction| if the event was not
61 // handled.
62 - (void)handlePressEvent:(FlutterUIPressProxy*)press
63  nextAction:(void (^)())nextAction API_AVAILABLE(ios(13.4));
64 - (void)addInternalPlugins;
65 - (void)deregisterNotifications;
66 
67 - (BOOL)supportsShowingSystemContextMenu;
68 - (BOOL)stateIsActive;
69 - (BOOL)stateIsForeground;
70 - (BOOL)stateIsBackground;
71 
72 /**
73  * Determines whether a UIScene notification should be handled by this view controller.
74  *
75  * In multi-scene environments (such as iPadOS split view, macOS Catalyst multi-window, or App
76  * Extensions), multiple UIWindowScene instances can exist in the same process space. Because the
77  * scene observers register to listen for all targets, they may receive lifecycle notifications
78  * from unrelated auxiliary or secondary scenes.
79  *
80  * @param notification The UIScene notification containing the transitioning UIScene in its object.
81  * @return YES if the notification matches this view controller's scene context.
82  * NO if it originates from an unrelated scene and should be ignored.
83  */
84 - (BOOL)shouldHandleSceneNotification:(NSNotification*)notification API_AVAILABLE(ios(13.0));
85 @end
86 
87 #endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERVIEWCONTROLLER_INTERNAL_H_
#define FLUTTER_DARWIN_EXPORT
Definition: FlutterMacros.h:14
FlutterTextInputPlugin * textInputPlugin
FLUTTER_DARWIN_EXPORT NSNotificationName const FlutterViewControllerHideHomeIndicator
FLUTTER_DARWIN_EXPORT NSNotificationName const FlutterViewControllerShowHomeIndicator
FLUTTER_DARWIN_EXPORT NSNotificationName const FlutterViewControllerWillDealloc