Package io.flutter.embedding.android

## Class FlutterFragmentActivity.NewEngineInGroupIntentBuilder

- java.lang.Object
- - io.flutter.embedding.android.FlutterFragmentActivity.NewEngineInGroupIntentBuilder

- Enclosing class:
    FlutterFragmentActivity

      public static class FlutterFragmentActivity.NewEngineInGroupIntentBuilder
      extends Object

  Builder to create an `Intent` that launches a `FlutterFragmentActivity` with a new `FlutterEngine` by FlutterEngineGroup#createAndRunEngine.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `NewEngineInGroupIntentBuilder​(Class<? extends FlutterFragmentActivity> activityClass, String engineGroupId)` | Constructor that allows this `NewEngineInGroupIntentBuilder` to be used by subclasses of `FlutterActivity`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `FlutterFragmentActivity.NewEngineInGroupIntentBuilder` | `backgroundMode​(FlutterActivityLaunchConfigs.BackgroundMode backgroundMode)` | The mode of `FlutterFragmentActivity`'s background, either `FlutterActivityLaunchConfigs.BackgroundMode.opaque` or `FlutterActivityLaunchConfigs.BackgroundMode.transparent`.
    `Intent` | `build​(Context context)` | Creates and returns an `Intent` that will launch a `FlutterFragmentActivity` with the desired configuration.
    `FlutterFragmentActivity.NewEngineInGroupIntentBuilder` | `dartEntrypoint​(String dartEntrypoint)` | The Dart entrypoint that will be executed as soon as the Dart snapshot is loaded, default to "main".
    `FlutterFragmentActivity.NewEngineInGroupIntentBuilder` | `initialRoute​(String initialRoute)` | The initial route that a Flutter app will render in this `FlutterFragmentActivity`, defaults to "/".

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### NewEngineInGroupIntentBuilder

          public NewEngineInGroupIntentBuilder​(@NonNull
                                               Class<? extends FlutterFragmentActivity> activityClass,
                                               @NonNull
                                               String engineGroupId)

      Constructor that allows this `NewEngineInGroupIntentBuilder` to be used by subclasses of `FlutterActivity`.

      Subclasses of `FlutterFragmentActivity` should provide their own static version of `FlutterFragmentActivity.withNewEngineInGroup(java.lang.String)`, which returns an instance of `NewEngineInGroupIntentBuilder` constructed with a `Class` reference to the `FlutterFragmentActivity` subclass, e.g.:

      `return new NewEngineInGroupIntentBuilder(FlutterFragmentActivity.class, cacheedEngineGroupId);`

      Parameters:
        `activityClass` - A subclass of `FlutterFragmentActivity`.
        `engineGroupId` - The engine group id.

  - ### Method Detail

    - #### dartEntrypoint

          @NonNull
          public FlutterFragmentActivity.NewEngineInGroupIntentBuilder dartEntrypoint​(@NonNull
                                                                                      String dartEntrypoint)

      The Dart entrypoint that will be executed as soon as the Dart snapshot is loaded, default to "main".
      Parameters:
        `dartEntrypoint` - The dart entrypoint's name
      Returns:
        The engine group intent builder

    - #### initialRoute

          @NonNull
          public FlutterFragmentActivity.NewEngineInGroupIntentBuilder initialRoute​(@NonNull
                                                                                    String initialRoute)

      The initial route that a Flutter app will render in this `FlutterFragmentActivity`, defaults to "/".

    - #### backgroundMode

          @NonNull
          public FlutterFragmentActivity.NewEngineInGroupIntentBuilder backgroundMode​(@NonNull
                                                                                      FlutterActivityLaunchConfigs.BackgroundMode backgroundMode)

      The mode of `FlutterFragmentActivity`'s background, either `FlutterActivityLaunchConfigs.BackgroundMode.opaque` or `FlutterActivityLaunchConfigs.BackgroundMode.transparent`.

      The default background mode is `FlutterActivityLaunchConfigs.BackgroundMode.opaque`.

      Choosing a background mode of `FlutterActivityLaunchConfigs.BackgroundMode.transparent` will configure the inner `FlutterView` of this `FlutterFragmentActivity` to be configured with a `FlutterTextureView` to support transparency. This choice has a non-trivial performance impact. A transparent background should only be used if it is necessary for the app design being implemented.

      A `FlutterFragmentActivity` that is configured with a background mode of `FlutterActivityLaunchConfigs.BackgroundMode.transparent` must have a theme applied to it that includes the following property: `<item name="android:windowIsTranslucent">true</item>`.

    - #### build

          @NonNull
          public Intent build​(@NonNull
                              Context context)

      Creates and returns an `Intent` that will launch a `FlutterFragmentActivity` with the desired configuration.