diff --git a/shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java b/shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java index 8f799ef49721d..3c91fdd3a1050 100644 --- a/shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java +++ b/shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java @@ -110,6 +110,9 @@ public void onPreEngineRestart() { /** * Constructs a new {@code FlutterEngine}. * + * {@code FlutterMain.startInitialization} must be called before constructing a {@code FlutterEngine} + * to load the native libraries needed to attach to JNI. + * * A new {@code FlutterEngine} does not execute any Dart code automatically. See * {@link #getDartExecutor()} and {@link DartExecutor#executeDartEntrypoint(DartExecutor.DartEntrypoint)} * to begin executing Dart code within this {@code FlutterEngine}. diff --git a/shell/platform/darwin/ios/framework/Headers/FlutterViewController.h b/shell/platform/darwin/ios/framework/Headers/FlutterViewController.h index fc2687c4456b3..ddbb87aa62e14 100644 --- a/shell/platform/darwin/ios/framework/Headers/FlutterViewController.h +++ b/shell/platform/darwin/ios/framework/Headers/FlutterViewController.h @@ -29,16 +29,18 @@ extern NSNotificationName const FlutterSemanticsUpdateNotification; /** * A `UIViewController` implementation for Flutter views. * - * Dart execution, channel communication, texture registration, and plugin registration - * are all handled by `FlutterEngine`. Calls on this class to those members all proxy - * through to the `FlutterEngine` attached FlutterViewController. - * - * A FlutterViewController can be initialized either with an already-running `FlutterEngine`, - * or it can be initialized with a `FlutterDartProject` that will be used to spin up - * a new `FlutterEngine`. Developers looking to present and hide FlutterViewControllers - * in native iOS applications will usually want to maintain the `FlutterEngine` instance - * so as not to lose Dart-related state and asynchronous tasks when navigating back and - * forth between a FlutterViewController and other `UIViewController`s. + * Dart execution, channel communication, texture registration, and plugin registration are all + * handled by `FlutterEngine`. Calls on this class to those members all proxy through to the + * `FlutterEngine` attached FlutterViewController. + * + * A FlutterViewController can be initialized either with an already-running `FlutterEngine` via + * the `initWithEngine:` initializer, or it can be initialized with a `FlutterDartProject` that + * will be used to implicitly spin up a new `FlutterEngine`. Creating a `FlutterEngine before + * showing a `FlutterViewController` can be used to pre-initialize the Dart VM and to prepare the + * isolate in order to reduce the latency to the first rendered frame. Holding a `FlutterEngine` + * independently of FlutterViewControllers can also be used to not to lose Dart-related state and + * asynchronous tasks when navigating back and forth between a FlutterViewController and other + * `UIViewController`s. */ FLUTTER_EXPORT @interface FlutterViewController : UIViewController