1package io.flutter.embedding.android;
3import static android.content.ComponentCallbacks2.*;
4import static org.junit.Assert.assertEquals;
5import static org.junit.Assert.assertFalse;
6import static org.junit.Assert.assertNotNull;
7import static org.junit.Assert.assertNull;
8import static org.junit.Assert.assertThrows;
9import static org.junit.Assert.assertTrue;
10import static org.mockito.ArgumentMatchers.any;
11import static org.mockito.ArgumentMatchers.eq;
12import static org.mockito.ArgumentMatchers.isNotNull;
13import static org.mockito.ArgumentMatchers.isNull;
14import static org.mockito.Mockito.mock;
15import static org.mockito.Mockito.never;
16import static org.mockito.Mockito.times;
17import static org.mockito.Mockito.verify;
18import static org.mockito.Mockito.when;
26import androidx.annotation.NonNull;
27import androidx.lifecycle.Lifecycle;
28import androidx.test.core.app.ApplicationProvider;
29import androidx.test.ext.junit.runners.AndroidJUnit4;
30import io.flutter.FlutterInjector;
31import io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.Host;
32import io.flutter.embedding.engine.FlutterEngine;
33import io.flutter.embedding.engine.FlutterEngineCache;
34import io.flutter.embedding.engine.FlutterEngineGroup;
35import io.flutter.embedding.engine.FlutterEngineGroupCache;
36import io.flutter.embedding.engine.FlutterShellArgs;
37import io.flutter.embedding.engine.dart.DartExecutor;
38import io.flutter.embedding.engine.loader.FlutterLoader;
39import io.flutter.embedding.engine.plugins.activity.ActivityControlSurface;
40import io.flutter.embedding.engine.renderer.FlutterRenderer;
41import io.flutter.embedding.engine.renderer.FlutterUiDisplayListener;
42import io.flutter.embedding.engine.systemchannels.AccessibilityChannel;
43import io.flutter.embedding.engine.systemchannels.BackGestureChannel;
44import io.flutter.embedding.engine.systemchannels.LifecycleChannel;
45import io.flutter.embedding.engine.systemchannels.LocalizationChannel;
46import io.flutter.embedding.engine.systemchannels.MouseCursorChannel;
47import io.flutter.embedding.engine.systemchannels.NavigationChannel;
48import io.flutter.embedding.engine.systemchannels.SettingsChannel;
49import io.flutter.embedding.engine.systemchannels.SystemChannel;
50import io.flutter.embedding.engine.systemchannels.TextInputChannel;
51import io.flutter.plugin.localization.LocalizationPlugin;
52import io.flutter.plugin.platform.PlatformViewsController;
53import java.util.ArrayList;
54import java.util.Arrays;
56import org.junit.Before;
58import org.junit.runner.RunWith;
59import org.mockito.ArgumentCaptor;
60import org.robolectric.Robolectric;
61import org.robolectric.android.controller.ActivityController;
62import org.robolectric.annotation.Config;
65@RunWith(AndroidJUnit4.class)
67 private final Context ctx = ApplicationProvider.getApplicationContext();
69 private FlutterActivityAndFragmentDelegate.Host mockHost;
70 private FlutterActivityAndFragmentDelegate.Host mockHost2;
72 @SuppressWarnings(
"deprecation")
80 mockFlutterEngine = mockFlutterEngine();
84 when(mockHost.getContext()).thenReturn(ctx);
85 when(mockHost.getActivity()).thenReturn(Robolectric.setupActivity(Activity.class));
86 when(mockHost.getLifecycle()).thenReturn(mock(Lifecycle.class));
87 when(mockHost.getFlutterShellArgs()).thenReturn(
new FlutterShellArgs(
new String[] {}));
88 when(mockHost.getDartEntrypointFunctionName()).thenReturn(
"main");
89 when(mockHost.getDartEntrypointArgs()).thenReturn(
null);
90 when(mockHost.getAppBundlePath()).thenReturn(
"/fake/path");
91 when(mockHost.getInitialRoute()).thenReturn(
"/");
94 when(mockHost.provideFlutterEngine(
any(Context.class))).thenReturn(mockFlutterEngine);
95 when(mockHost.shouldAttachEngineToActivity()).thenReturn(
true);
96 when(mockHost.shouldHandleDeeplinking()).thenReturn(
false);
97 when(mockHost.shouldDestroyEngineWithHost()).thenReturn(
true);
98 when(mockHost.shouldDispatchAppLifecycleState()).thenReturn(
true);
99 when(mockHost.attachToEngineAutomatically()).thenReturn(
true);
102 when(mockHost2.getContext()).thenReturn(ctx);
103 when(mockHost2.getActivity()).thenReturn(Robolectric.setupActivity(Activity.class));
104 when(mockHost2.getLifecycle()).thenReturn(mock(Lifecycle.class));
105 when(mockHost2.getFlutterShellArgs()).thenReturn(
new FlutterShellArgs(
new String[] {}));
106 when(mockHost2.getDartEntrypointFunctionName()).thenReturn(
"main");
107 when(mockHost2.getDartEntrypointArgs()).thenReturn(
null);
108 when(mockHost2.getAppBundlePath()).thenReturn(
"/fake/path");
109 when(mockHost2.getInitialRoute()).thenReturn(
"/");
112 when(mockHost2.provideFlutterEngine(
any(Context.class))).thenReturn(mockFlutterEngine);
113 when(mockHost2.shouldAttachEngineToActivity()).thenReturn(
true);
114 when(mockHost2.shouldHandleDeeplinking()).thenReturn(
false);
115 when(mockHost2.shouldDestroyEngineWithHost()).thenReturn(
true);
116 when(mockHost2.shouldDispatchAppLifecycleState()).thenReturn(
true);
117 when(mockHost2.attachToEngineAutomatically()).thenReturn(
true);
206 when(mockHost.shouldDispatchAppLifecycleState()).thenReturn(
false);
239 verify(mockHost,
times(1)).provideFlutterEngine(
any(Context.class));
243 "The delegate failed to use the host's FlutterEngine.",
256 when(mockHost.getCachedEngineId()).thenReturn(
"my_flutter_engine");
282 @Test(expected = IllegalStateException.class)
283 public
void itThrowsExceptionIfCachedEngineDoesNotExist() {
286 when(mockHost.getCachedEngineId()).thenReturn(
"my_flutter_engine");
303 Activity mockActivity = mock(Activity.class);
304 Intent mockIntent = mock(Intent.class);
305 when(mockFlutterLoader.
findAppBundlePath()).thenReturn(
"default_flutter_assets/path");
312 entryPointArgs.add(
"entrypoint-arg");
315 when(mockHost.getInitialRoute()).thenReturn(
null);
316 when(mockHost.getCachedEngineGroupId()).thenReturn(
"my_flutter_engine_group");
317 when(mockHost.provideFlutterEngine(
any(Context.class))).thenReturn(
null);
318 when(mockHost.shouldAttachEngineToActivity()).thenReturn(
false);
319 when(mockHost.getDartEntrypointArgs()).thenReturn(entryPointArgs);
320 when(mockHost.shouldHandleDeeplinking()).thenReturn(
true);
321 when(mockHost.getActivity()).thenReturn(mockActivity);
322 when(mockActivity.getIntent()).thenReturn(mockIntent);
323 when(mockIntent.getData()).thenReturn(Uri.parse(
"foo://example.com/initial_route"));
335 verify(flutterEngineGroup,
times(1)).createAndRunEngine(optionsCaptor.capture());
336 assertEquals(
"foo://example.com/initial_route", optionsCaptor.getValue().getInitialRoute());
343 when(mockFlutterLoader.
findAppBundlePath()).thenReturn(
"default_flutter_assets/path");
350 entryPointArgs.add(
"entrypoint-arg");
353 when(mockHost.getCachedEngineGroupId()).thenReturn(
"my_flutter_engine_group");
354 when(mockHost.provideFlutterEngine(
any(Context.class))).thenReturn(
null);
355 when(mockHost.shouldAttachEngineToActivity()).thenReturn(
false);
356 when(mockHost.getDartEntrypointArgs()).thenReturn(entryPointArgs);
371 verify(flutterEngineGroup,
times(1)).createAndRunEngine(optionsCaptor.capture());
372 assertEquals(mockHost.getContext(), optionsCaptor.getValue().getContext());
373 assertEquals(entrypoint, optionsCaptor.getValue().getDartEntrypoint());
374 assertEquals(mockHost.getInitialRoute(), optionsCaptor.getValue().getInitialRoute());
375 assertNotNull(optionsCaptor.getValue().getDartEntrypointArgs());
376 assertEquals(1, optionsCaptor.getValue().getDartEntrypointArgs().size());
377 assertEquals(
"entrypoint-arg", optionsCaptor.getValue().getDartEntrypointArgs().get(0));
380 @Test(expected = IllegalStateException.class)
381 public
void itThrowsExceptionIfNewEngineInGroupNotExist() {
386 when(mockHost.getCachedEngineGroupId()).thenReturn(
"my_flutter_engine_group");
387 when(mockHost.getCachedEngineId()).thenReturn(
null);
388 when(mockHost.provideFlutterEngine(
any(Context.class))).thenReturn(
null);
389 when(mockHost.shouldAttachEngineToActivity()).thenReturn(
false);
412 verify(mockHost,
times(1)).configureFlutterEngine(mockFlutterEngine);
426 verify(mockHost,
times(1)).onFlutterSurfaceViewCreated(isNotNull());
429 @SuppressWarnings(
"deprecation")
435 Host customMockHost = mock(
Host.class);
436 when(customMockHost.
getContext()).thenReturn(ctx);
437 when(customMockHost.
getActivity()).thenReturn(Robolectric.setupActivity(Activity.class));
438 when(customMockHost.
getLifecycle()).thenReturn(mock(Lifecycle.class));
458 verify(customMockHost,
times(1)).onFlutterTextureViewCreated(isNotNull());
473 verify(mockHost,
times(1)).cleanUpFlutterEngine(mockFlutterEngine);
480 when(mockHost.getInitialRoute()).thenReturn(
"/my/route");
499 when(mockHost.getAppBundlePath()).thenReturn(
"/my/bundle/path");
500 when(mockHost.getDartEntrypointFunctionName()).thenReturn(
"myEntrypoint");
503 DartExecutor.DartEntrypoint dartEntrypoint =
517 .executeDartEntrypoint(
eq(dartEntrypoint), isNull());
524 when(mockHost.getAppBundlePath()).thenReturn(
"/my/bundle/path");
525 when(mockHost.getDartEntrypointFunctionName()).thenReturn(
"myEntrypoint");
526 List<String> dartEntrypointArgs =
new ArrayList<String>(Arrays.asList(
"foo",
"bar"));
527 when(mockHost.getDartEntrypointArgs()).thenReturn(dartEntrypointArgs);
530 DartExecutor.DartEntrypoint dartEntrypoint =
549 when(mockHost.getAppBundlePath()).thenReturn(
"/my/bundle/path");
550 when(mockHost.getDartEntrypointFunctionName()).thenReturn(
"myEntrypoint");
551 when(mockHost.getDartEntrypointLibraryUri()).thenReturn(
"package:foo/bar.dart");
553 DartExecutor.DartEntrypoint expectedEntrypoint =
563 .executeDartEntrypoint(
eq(expectedEntrypoint), isNull());
570 when(mockFlutterLoader.
findAppBundlePath()).thenReturn(
"default_flutter_assets/path");
575 when(mockHost.getAppBundlePath()).thenReturn(
null);
576 when(mockHost.getDartEntrypointFunctionName()).thenReturn(
"myEntrypoint");
579 DartExecutor.DartEntrypoint dartEntrypoint =
593 .executeDartEntrypoint(
eq(dartEntrypoint), isNull());
603 when(mockHost.shouldAttachEngineToActivity()).thenReturn(
true);
630 when(mockHost.shouldAttachEngineToActivity()).thenReturn(
false);
633 when(mockHost.getActivity()).thenReturn(
null);
686 BackEvent backEvent = mock(BackEvent.class);
703 BackEvent backEvent = mock(BackEvent.class);
708 .updateBackGestureProgress(backEvent);
757 .onRequestPermissionsResult(
any(Integer.class),
any(String[].
class),
any(
int[].
class));
764 intent.setData(Uri.parse(
"http://myApp/custom/route?query=test"));
766 ActivityController<FlutterActivity> activityController =
770 when(mockHost.getActivity()).thenReturn(flutterActivity);
771 when(mockHost.getInitialRoute()).thenReturn(
null);
772 when(mockHost.shouldHandleDeeplinking()).thenReturn(
true);
785 .setInitialRoute(
"http://myApp/custom/route?query=test");
792 intent.setData(Uri.parse(
"http://myApp/custom/route?query=test#fragment"));
794 ActivityController<FlutterActivity> activityController =
798 when(mockHost.getActivity()).thenReturn(flutterActivity);
799 when(mockHost.getInitialRoute()).thenReturn(
null);
800 when(mockHost.shouldHandleDeeplinking()).thenReturn(
true);
813 .setInitialRoute(
"http://myApp/custom/route?query=test#fragment");
820 intent.setData(Uri.parse(
"http://myApp/custom/route#fragment"));
822 ActivityController<FlutterActivity> activityController =
826 when(mockHost.getActivity()).thenReturn(flutterActivity);
827 when(mockHost.getInitialRoute()).thenReturn(
null);
828 when(mockHost.shouldHandleDeeplinking()).thenReturn(
true);
841 .setInitialRoute(
"http://myApp/custom/route#fragment");
848 intent.setData(Uri.parse(
"http://myApp/custom/route"));
850 ActivityController<FlutterActivity> activityController =
854 when(mockHost.getActivity()).thenReturn(flutterActivity);
855 when(mockHost.getInitialRoute()).thenReturn(
null);
856 when(mockHost.shouldHandleDeeplinking()).thenReturn(
true);
869 .setInitialRoute(
"http://myApp/custom/route");
877 ActivityController<FlutterActivity> activityController =
881 when(mockHost.getActivity()).thenReturn(flutterActivity);
882 when(mockHost.getInitialRoute()).thenReturn(
null);
883 when(mockHost.shouldHandleDeeplinking()).thenReturn(
true);
900 when(mockHost.shouldHandleDeeplinking()).thenReturn(
true);
907 String expected =
"http://myApp/custom/route?query=test";
909 Intent mockIntent = mock(Intent.class);
910 when(mockIntent.getData()).thenReturn(Uri.parse(expected));
920 when(mockHost.shouldHandleDeeplinking()).thenReturn(
true);
928 Intent mockIntent = mock(Intent.class);
931 when(mockIntent.getData()).thenReturn(Uri.parse(
"mailto:test@test.com"));
938 .pushRouteInformation(
"mailto:test@test.com");
943 when(mockHost.shouldHandleDeeplinking()).thenReturn(
true);
950 String expected =
"http://myApp/custom/route?query=test#fragment";
952 Intent mockIntent = mock(Intent.class);
953 when(mockIntent.getData()).thenReturn(Uri.parse(expected));
963 when(mockHost.shouldHandleDeeplinking()).thenReturn(
true);
970 String expected =
"http://myApp/custom/route#fragment";
972 Intent mockIntent = mock(Intent.class);
973 when(mockIntent.getData()).thenReturn(Uri.parse(expected));
983 when(mockHost.shouldHandleDeeplinking()).thenReturn(
true);
990 String expected =
"http://myApp/custom/route#fragment";
992 Intent mockIntent = mock(Intent.class);
993 when(mockIntent.getData()).thenReturn(Uri.parse(expected));
1031 .onActivityResult(
any(Integer.class),
any(Integer.class), isNull());
1060 verify(mockHost,
times(0)).onFlutterUiDisplayed();
1076 verify(mockHost,
times(0)).onFlutterUiDisplayed();
1080 ArgumentCaptor<FlutterUiDisplayListener> listenerCaptor =
1084 listenerCaptor.getValue().onFlutterUiDisplayed();
1086 verify(mockHost,
times(1)).onFlutterUiDisplayed();
1106 when(mockHost.shouldDestroyEngineWithHost()).thenReturn(
true);
1123 verify(mockFlutterEngine,
times(1)).destroy();
1130 when(mockHost.shouldDestroyEngineWithHost()).thenReturn(
false);
1147 verify(mockFlutterEngine, never()).destroy();
1158 when(mockHost.getCachedEngineId()).thenReturn(
"my_flutter_engine");
1161 when(mockHost.shouldDestroyEngineWithHost()).thenReturn(
true);
1178 verify(cachedEngine,
times(1)).destroy();
1190 when(mockHost.getCachedEngineId()).thenReturn(
"my_flutter_engine");
1193 when(mockHost.shouldDestroyEngineWithHost()).thenReturn(
false);
1210 verify(cachedEngine, never()).destroy();
1223 boolean shouldDelayFirstAndroidViewDraw =
true;
1224 delegate.
onCreateView(
null,
null,
null, 0, shouldDelayFirstAndroidViewDraw);
1239 boolean shouldDelayFirstAndroidViewDraw =
false;
1240 delegate.
onCreateView(
null,
null,
null, 0, shouldDelayFirstAndroidViewDraw);
1256 boolean shouldDelayFirstAndroidViewDraw =
true;
1258 IllegalArgumentException.class,
1260 delegate.onCreateView(null, null, null, 0, shouldDelayFirstAndroidViewDraw);
1275 assertEquals(View.VISIBLE, delegate.
flutterView.getVisibility());
1278 assertEquals(View.GONE, delegate.
flutterView.getVisibility());
1281 assertEquals(View.VISIBLE, delegate.
flutterView.getVisibility());
1283 delegate.
flutterView.setVisibility(View.INVISIBLE);
1286 assertEquals(View.GONE, delegate.
flutterView.getVisibility());
1289 assertEquals(View.INVISIBLE, delegate.
flutterView.getVisibility());
1294 assertEquals(View.GONE, delegate.
flutterView.getVisibility());
1297 assertEquals(View.GONE, delegate.
flutterView.getVisibility());
1316 assertEquals(View.GONE, surfaceView.getVisibility());
1319 assertEquals(View.VISIBLE, surfaceView.getVisibility());
1321 delegate.
flutterView.setVisibility(View.INVISIBLE);
1322 assertEquals(View.INVISIBLE, surfaceView.getVisibility());
1329 .thenReturn(mockFlutterEngine);
1330 FlutterActivityAndFragmentDelegate.Host
host =
1332 when(mockHost.getContext()).thenReturn(ctx);
1338 assertEquals(engineUnderTest, mockFlutterEngine);
1350 assertTrue(delegate.
flutterView.isAttachedToFlutterEngine());
1357 when(mockHost.attachToEngineAutomatically()).thenReturn(
false);
1363 assertFalse(delegate.
flutterView.isAttachedToFlutterEngine());
1372 when(mockHost.shouldDestroyEngineWithHost()).thenReturn(
false);
1373 when(mockHost2.shouldDestroyEngineWithHost()).thenReturn(
false);
1376 when(mockHost.getCachedEngineId()).thenReturn(
"my_flutter_engine");
1377 when(mockHost2.getCachedEngineId()).thenReturn(
"my_flutter_engine");
1448 .thenReturn(fakeMessageBuilder);
1449 when(fakeMessageBuilder.setTextScaleFactor(
any(Float.class))).thenReturn(fakeMessageBuilder);
1450 when(fakeMessageBuilder.setDisplayMetrics(
any())).thenReturn(fakeMessageBuilder);
1451 when(fakeMessageBuilder.setNativeSpellCheckServiceDefined(
any(Boolean.class)))
1452 .thenReturn(fakeMessageBuilder);
1453 when(fakeMessageBuilder.setBrieflyShowPassword(
any(Boolean.class)))
1454 .thenReturn(fakeMessageBuilder);
1455 when(fakeMessageBuilder.setUse24HourFormat(
any(Boolean.class))).thenReturn(fakeMessageBuilder);
1456 when(fakeSettingsChannel.
startMessage()).thenReturn(fakeMessageBuilder);
static SkISize times(const SkISize &size, float factor)
static bool eq(const SkM44 &a, const SkM44 &b, float tol)
Builder setFlutterLoader(@NonNull FlutterLoader flutterLoader)
static void setInstance(@NonNull FlutterInjector injector)
void itSendsInitialRouteToFlutter()
void itAttachesFlutterToTheActivityIfDesired()
void itDestroysItsOwnEngineIfHostRequestsIt()
void itGivesHostAnOpportunityToConfigureFlutterEngine()
void itDoesNotAttachFlutterToTheActivityIfNotDesired()
void itUsesNewEngineInGroupWhenProvided()
void itExecutesDartEntrypointProvidedByHost()
void itDefersToTheHostToProvideFlutterEngine()
void itSendsInitialRouteFromIntentOnStartIfNoInitialRouteFromActivityAndShouldHandleDeeplinkingWithQueryParameterAndFragment()
void itDoesSendPushRouteInformationMessageWhenOnNewIntentIsNonHierarchicalUri()
void itSendsPushRouteInformationMessageWhenOnNewIntent()
void itSendsLifecycleEventsToFlutter()
void itDoesNotDelayFirstDrawWhenNotRequested()
void itUsesDefaultFlutterLoaderAppBundlePathWhenUnspecified()
void itSendsPushRouteInformationMessageWhenOnNewIntentWithQueryParameterAndFragment()
void itSendsPushRouteInformationMessageWhenOnNewIntentWithFragmentNoQueryParameter()
void itDoesNotDestroyItsOwnEngineWhenHostSaysNotTo()
void itForwardsOnNewIntentToFlutterEngine()
void itDoesAttachFlutterViewToEngine()
void itSendsInitialRouteFromIntentOnStartIfNoInitialRouteFromActivityAndShouldHandleDeeplinking()
void usesFlutterEngineGroup()
void itDoesNotAttachFlutterViewToEngine()
void itDelaysFirstDrawWhenRequested()
void itChangesFlutterViewVisibilityWhenOnStartAndOnStop()
void itExecutesDartLibraryUriProvidedByHost()
void itForwardsCancelBackGestureToFlutter()
void itSendsInitialRouteFromIntentOnStartIfNoInitialRouteFromActivityAndShouldHandleDeeplinkingNoQueryParameter()
void itSendsPopRouteMessageToFlutterWhenHardwareBackButtonIsPressed()
void itSendsInitialRouteFromIntentOnStartIfNoInitialRouteFromActivityAndShouldHandleDeeplinkingWithFragmentNoQueryParameter()
void itExecutesDartEntrypointWithArgsProvidedByHost()
void itForwardsCommitBackGestureToFlutter()
void itForwardsUpdateBackGestureProgressToFlutter()
void itGivesHostAnOpportunityToConfigureFlutterTextureView()
void itUsesCachedEngineWhenProvided()
void itSendsPushRouteInformationMessageWhenOnNewIntentNoQueryParameter()
void flutterEngineGroupGetsInitialRouteFromIntent()
void itForwardsOnRequestPermissionsResultToFlutterEngine()
void itDoesNotSendsLifecycleEventsToFlutter()
void itForwardsOnActivityResultToFlutterEngine()
void itForwardsOnUserLeaveHintToFlutterEngine()
void itSendsdefaultInitialRouteOnStartIfNotDeepLinkingFromIntent()
void itDoesNotDestroyCachedEngineWhenHostSaysNotTo()
void flutterSurfaceViewVisibilityChangedWithFlutterView()
void itDestroysCachedEngineWhenHostRequestsIt()
void itThrowsWhenDelayingTheFirstDrawAndUsingATextureView()
void itDoesNotDetachTwice()
void itGivesHostAnOpportunityToCleanUpFlutterEngine()
void itForwardsStartBackGestureToFlutter()
void itGivesHostAnOpportunityToConfigureFlutterSurfaceView()
void itNotifiesDartExecutorAndSendsMessageOverSystemChannelWhenToldToTrimMemory()
View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState, int flutterViewId, boolean shouldDelayFirstAndroidViewDraw)
void onActivityResult(int requestCode, int resultCode, Intent data)
OnPreDrawListener activePreDrawListener
void updateBackGestureProgress(@NonNull BackEvent backEvent)
void onAttach(@NonNull Context context)
void startBackGesture(@NonNull BackEvent backEvent)
void onTrimMemory(int level)
void onWindowFocusChanged(boolean hasFocus)
void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults)
void onNewIntent(@NonNull Intent intent)
FlutterEngine getFlutterEngine()
static Intent createDefaultIntent(@NonNull Context launchContext)
RenderSurface renderSurface
static FlutterEngineCache getInstance()
void put(@NonNull String engineId, @Nullable FlutterEngine engine)
FlutterEngine get(@NonNull String engineId)
void put(@NonNull String engineGroupId, @Nullable FlutterEngineGroup engineGroup)
static FlutterEngineGroupCache getInstance()
FlutterEngine createAndRunEngine( @NonNull Context context, @Nullable DartEntrypoint dartEntrypoint)
PlatformViewsController getPlatformViewsController()
ActivityControlSurface getActivityControlSurface()
BackGestureChannel getBackGestureChannel()
MouseCursorChannel getMouseCursorChannel()
FlutterRenderer getRenderer()
NavigationChannel getNavigationChannel()
AccessibilityChannel getAccessibilityChannel()
SettingsChannel getSettingsChannel()
LocalizationChannel getLocalizationChannel()
LocalizationPlugin getLocalizationPlugin()
DartExecutor getDartExecutor()
LifecycleChannel getLifecycleChannel()
SystemChannel getSystemChannel()
TextInputChannel getTextInputChannel()
String findAppBundlePath()
void addIsDisplayingFlutterUiListener(@NonNull FlutterUiDisplayListener listener)
MessageBuilder startMessage()
RenderMode getRenderMode()
boolean shouldAttachEngineToActivity()
boolean shouldDestroyEngineWithHost()
String getDartEntrypointFunctionName()
FlutterShellArgs getFlutterShellArgs()
String getAppBundlePath()
FlutterEngine provideFlutterEngine(@NonNull Context context)
TransparencyMode getTransparencyMode()
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service host
SIT bool any(const Vec< 1, T > &x)