File tree Expand file tree Collapse file tree
shell/platform/android/io/flutter/embedding Expand file tree Collapse file tree Original file line number Diff line number Diff line change 107107 *
108108 * <p>The following illustrates how to pre-warm and cache a {@link FlutterEngine}:
109109 *
110- * <pre>{@code
111- * // Create and pre-warm a FlutterEngine.
112- * FlutterEngine flutterEngine = new FlutterEngine(context);
113- * flutterEngine.getDartExecutor().executeDartEntrypoint(DartEntrypoint.createDefault());
114- *
115- * // Cache the pre-warmed FlutterEngine in the FlutterEngineCache.
116- * FlutterEngineCache.getInstance().put("my_engine", flutterEngine);
117- * }</pre>
110+ * <p>{@code // Create and pre-warm a FlutterEngine. FlutterEngine flutterEngine = new
111+ * FlutterEngine(context); flutterEngine .getDartExecutor()
112+ * .executeDartEntrypoint(DartEntrypoint.createDefault());
113+ *
114+ * <p>// Cache the pre-warmed FlutterEngine in the FlutterEngineCache.
115+ * FlutterEngineCache.getInstance().put("my_engine", flutterEngine); }
118116 *
119117 * <p><strong>Alternatives to FlutterActivity</strong>
120118 *
Original file line number Diff line number Diff line change 6767 *
6868 * <p>The following illustrates how to pre-warm and cache a {@link FlutterEngine}:
6969 *
70- * <pre>{@code
71- * // Create and pre-warm a FlutterEngine. FlutterEngine flutterEngine = new
72- * FlutterEngine(context);
73- * flutterEngine.getDartExecutor().executeDartEntrypoint(DartEntrypoint.createDefault());
70+ * <p>{@code // Create and pre-warm a FlutterEngine. FlutterEngine flutterEngine = new
71+ * FlutterEngine(context); flutterEngine .getDartExecutor()
72+ * .executeDartEntrypoint(DartEntrypoint.createDefault());
7473 *
75- * // Cache the pre-warmed FlutterEngine in the FlutterEngineCache.
76- * FlutterEngineCache.getInstance().put("my_engine", flutterEngine);
77- * }</pre>
74+ * <p>// Cache the pre-warmed FlutterEngine in the FlutterEngineCache.
75+ * FlutterEngineCache.getInstance().put("my_engine", flutterEngine); }
7876 *
7977 * <p>If Flutter is needed in a location that can only use a {@code View}, consider using a {@link
8078 * FlutterView}. Using a {@link FlutterView} requires forwarding some calls from an {@code
Original file line number Diff line number Diff line change 5656 * <p>To connect part of an Android app to Flutter's C/C++ engine, instantiate a {@code FlutterJNI}
5757 * and then attach it to the native side:
5858 *
59- * <pre>{@code
60- * // Instantiate FlutterJNI and attach to the native side.
61- * FlutterJNI flutterJNI = new FlutterJNI();
62- * flutterJNI.attachToNative();
59+ * <p>{@code // Instantiate FlutterJNI and attach to the native side. FlutterJNI flutterJNI = new
60+ * FlutterJNI(); flutterJNI.attachToNative();
6361 *
64- * // Use FlutterJNI as desired. flutterJNI.dispatchPointerDataPacket(...);
62+ * <p> // Use FlutterJNI as desired. flutterJNI.dispatchPointerDataPacket(...);
6563 *
66- * // Destroy the connection to the native side and cleanup.
67- * flutterJNI.detachFromNativeAndReleaseResources();
68- * }</pre>
64+ * <p>// Destroy the connection to the native side and cleanup.
65+ * flutterJNI.detachFromNativeAndReleaseResources(); }
6966 *
7067 * <p>To provide a visual, interactive surface for Flutter rendering and touch events, register a
7168 * {@link RenderSurface} with {@link #setRenderSurface(RenderSurface)}
You can’t perform that action at this time.
0 commit comments