Class FlutterEngineGroup.Options

  • Enclosing class:
    FlutterEngineGroup

    public static class FlutterEngineGroup.Options
    extends Object
    Options that control how a FlutterEngine should be created.
    • Constructor Detail

      • Options

        public Options​(@NonNull
                       Context context)
    • Method Detail

      • getContext

        public Context getContext()
      • getDartEntrypoint

        public DartExecutor.DartEntrypoint getDartEntrypoint()
        dartEntrypoint specifies the DartExecutor.DartEntrypoint the new engine should run. It doesn't need to be the same entrypoint as the current engine but must be built in the same AOT or snapshot.
      • getInitialRoute

        public String getInitialRoute()
        The name of the initial Flutter `Navigator` `Route` to load. If this is null, it will default to the "/" route.
      • getDartEntrypointArgs

        public List<String> getDartEntrypointArgs()
        Arguments passed as a list of string to Dart's entrypoint function.
      • getAutomaticallyRegisterPlugins

        public boolean getAutomaticallyRegisterPlugins()
        If plugins are automatically registered, then they are registered during the FlutterEngine's constructor.
      • getWaitForRestorationData

        public boolean getWaitForRestorationData()
        The waitForRestorationData flag controls whether the engine delays responding to requests from the framework for restoration data until that data has been provided to the engine via RestorationChannel.setRestorationData(byte[] data).
      • setInitialRoute

        public FlutterEngineGroup.Options setInitialRoute​(String initialRoute)
        Setter for `initialRoute` property.
        Parameters:
        initialRoute - The name of the initial Flutter `Navigator` `Route` to load. If this is null, it will default to the "/" route.
      • setDartEntrypointArgs

        public FlutterEngineGroup.Options setDartEntrypointArgs​(List<String> dartEntrypointArgs)
        Setter for `dartEntrypointArgs` property.
        Parameters:
        dartEntrypointArgs - Arguments passed as a list of string to Dart's entrypoint function.
      • setPlatformViewsController

        public FlutterEngineGroup.Options setPlatformViewsController​(@NonNull
                                                                     PlatformViewsController platformViewsController)
        Setter for `platformViewsController` property.
        Parameters:
        platformViewsController - Manages platform views.
      • setAutomaticallyRegisterPlugins

        public FlutterEngineGroup.Options setAutomaticallyRegisterPlugins​(boolean automaticallyRegisterPlugins)
        Setter for `automaticallyRegisterPlugins` property.
        Parameters:
        automaticallyRegisterPlugins - If plugins are automatically registered, then they are registered during the execution of FlutterEngine's constructor.
      • setWaitForRestorationData

        public FlutterEngineGroup.Options setWaitForRestorationData​(boolean waitForRestorationData)
        Setter for `waitForRestorationData` property.
        Parameters:
        waitForRestorationData - The waitForRestorationData flag controls whether the engine delays responding to requests from the framework for restoration data until that data has been provided to the engine via RestorationChannel.setRestorationData(byte[] data).