text stringlengths 1 372 |
|---|
[self.flutterengine runWithEntrypoint:nil]; |
[generatedpluginregistrant registerWithRegistry:self.flutterEngine]; |
return [_lifecycledelegate application:application didFinishLaunchingWithOptions:launchOptions]; |
} |
// returns the key window's rootViewController, if it's a FlutterViewController. |
// otherwise, returns nil. |
- (flutterviewcontroller*)rootflutterviewcontroller { |
UIViewController* viewController = [uiapplication sharedApplication].keyWindow.rootViewController; |
if ([viewcontroller isKindOfClass:[FlutterViewController class]]) { |
return (flutterviewcontroller*)viewcontroller; |
} |
return nil; |
} |
- (void)application:(uiapplication*)application |
didRegisterUserNotificationSettings:(UIUserNotificationSettings*)notificationSettings { |
[_lifecycledelegate application:application |
didRegisterUserNotificationSettings:notificationSettings]; |
} |
- (void)application:(uiapplication*)application |
didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken { |
[_lifecycledelegate application:application |
didRegisterForRemoteNotificationsWithDeviceToken:deviceToken]; |
} |
- (void)application:(uiapplication*)application |
didReceiveRemoteNotification:(NSDictionary*)userInfo |
fetchCompletionHandler:(void (^)(uibackgroundfetchresult result))completionHandler { |
[_lifecycledelegate application:application |
didReceiveRemoteNotification:userInfo |
fetchCompletionHandler:completionHandler]; |
} |
- (bool)application:(uiapplication*)application |
openURL:(NSURL*)url |
options:(NSDictionary<UIApplicationOpenURLOptionsKey, id>*)options { |
return [_lifecycledelegate application:application openURL:url options:options]; |
} |
- (bool)application:(uiapplication*)application handleOpenURL:(NSURL*)url { |
return [_lifecycledelegate application:application handleOpenURL:url]; |
} |
- (bool)application:(uiapplication*)application |
openURL:(NSURL*)url |
sourceApplication:(NSString*)sourceApplication |
annotation:(id)annotation { |
return [_lifecycledelegate application:application |
openURL:url |
sourceApplication:sourceApplication |
annotation:annotation]; |
} |
- (void)application:(uiapplication*)application |
performActionForShortcutItem:(UIApplicationShortcutItem*)shortcutItem |
completionHandler:(void (^)(bool succeeded))completionHandler { |
[_lifecycledelegate application:application |
performActionForShortcutItem:shortcutItem |
completionHandler:completionHandler]; |
} |
- (void)application:(uiapplication*)application |
handleEventsForBackgroundURLSession:(nonnull NSString*)identifier |
completionHandler:(nonnull void (^)(void))completionhandler { |
[_lifecycledelegate application:application |
handleEventsForBackgroundURLSession:identifier |
completionHandler:completionHandler]; |
} |
- (void)application:(uiapplication*)application |
performFetchWithCompletionHandler:(void (^)(uibackgroundfetchresult result))completionHandler { |
[_lifecycledelegate application:application performFetchWithCompletionHandler:completionHandler]; |
} |
- (void)addapplicationlifecycledelegate:(nsobject<flutterplugin>*)delegate { |
[_lifecycledelegate addDelegate:delegate]; |
} |
@end |
<code_end> |
<topic_end> |
<topic_start> |
launch options |
the examples demonstrate running flutter using the default launch settings. |
in order to customize your flutter runtime, |
you can also specify the dart entrypoint, library, and route. |
<topic_end> |
<topic_start> |
dart entrypoint |
calling run on a FlutterEngine, by default, |
runs the main() dart function |
of your lib/main.dart file. |
you can also run a different entrypoint function by using |
runWithEntrypoint with an NSString specifying |
a different dart function. |
info note |
dart entrypoint functions other than main() |
must be annotated with the following in order to |
not be tree-shaken away when compiling: |
<topic_end> |
<topic_start> |
dart library |
in addition to specifying a dart function, you can specify an entrypoint |
function in a specific file. |
for instance the following runs myOtherEntrypoint() |
in lib/other_file.dart instead of main() in lib/main.dart: |
<topic_end> |
<topic_start> |
route |
starting in flutter version 1.22, an initial route can be set for your flutter |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.