File tree Expand file tree Collapse file tree 3 files changed +23
-16
lines changed
shell/platform/android/io/flutter/embedding Expand file tree Collapse file tree 3 files changed +23
-16
lines changed 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- * <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); }
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>
116118 *
117119 * <p><strong>Alternatives to FlutterActivity</strong>
118120 *
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- * <p>{@code // Create and pre-warm a FlutterEngine. FlutterEngine flutterEngine = new
71- * FlutterEngine(context); flutterEngine .getDartExecutor()
72- * .executeDartEntrypoint(DartEntrypoint.createDefault());
70+ * <pre>{@code
71+ * // Create and pre-warm a FlutterEngine. FlutterEngine flutterEngine = new
72+ * FlutterEngine(context);
73+ * flutterEngine.getDartExecutor().executeDartEntrypoint(DartEntrypoint.createDefault());
7374 *
74- * <p>// Cache the pre-warmed FlutterEngine in the FlutterEngineCache.
75- * FlutterEngineCache.getInstance().put("my_engine", flutterEngine); }
75+ * // Cache the pre-warmed FlutterEngine in the FlutterEngineCache.
76+ * FlutterEngineCache.getInstance().put("my_engine", flutterEngine);
77+ * }</pre>
7678 *
7779 * <p>If Flutter is needed in a location that can only use a {@code View}, consider using a {@link
7880 * 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- * <p>{@code // Instantiate FlutterJNI and attach to the native side. FlutterJNI flutterJNI = new
60- * FlutterJNI(); flutterJNI.attachToNative();
59+ * <pre>{@code
60+ * // Instantiate FlutterJNI and attach to the native side.
61+ * FlutterJNI flutterJNI = new FlutterJNI();
62+ * flutterJNI.attachToNative();
6163 *
62- * <p> // Use FlutterJNI as desired. flutterJNI.dispatchPointerDataPacket(...);
64+ * // Use FlutterJNI as desired. flutterJNI.dispatchPointerDataPacket(...);
6365 *
64- * <p>// Destroy the connection to the native side and cleanup.
65- * flutterJNI.detachFromNativeAndReleaseResources(); }
66+ * // Destroy the connection to the native side and cleanup.
67+ * flutterJNI.detachFromNativeAndReleaseResources();
68+ * }</pre>
6669 *
6770 * <p>To provide a visual, interactive surface for Flutter rendering and touch events, register a
6871 * {@link RenderSurface} with {@link #setRenderSurface(RenderSurface)}
You can’t perform that action at this time.
0 commit comments