Flutter Engine
The Flutter Engine
shell
platform
android
io
flutter
embedding
android
FlutterEngineConfigurator.java
Go to the documentation of this file.
1
// Copyright 2013 The Flutter Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
package
io.flutter.embedding.android;
6
7
import
androidx.annotation.NonNull;
8
import
androidx.lifecycle.Lifecycle;
9
import
io.flutter.embedding.engine.FlutterEngine;
10
11
/**
12
* Configures a {@link io.flutter.embedding.engine.FlutterEngine} after it is created, e.g., adds
13
* plugins.
14
*
15
* <p>This interface may be applied to a {@link androidx.fragment.app.FragmentActivity} that owns a
16
* {@code FlutterFragment}.
17
*/
18
public
interface
FlutterEngineConfigurator
{
19
/**
20
* Configures the given {@link io.flutter.embedding.engine.FlutterEngine}.
21
*
22
* <p>This method is called after the given {@link io.flutter.embedding.engine.FlutterEngine} has
23
* been attached to the owning {@code FragmentActivity}. See {@link
24
* io.flutter.embedding.engine.plugins.activity.ActivityControlSurface#attachToActivity(
25
* ExclusiveAppComponent, Lifecycle)}.
26
*
27
* <p>It is possible that the owning {@code FragmentActivity} opted not to connect itself as an
28
* {@link io.flutter.embedding.engine.plugins.activity.ActivityControlSurface}. In that case, any
29
* configuration, e.g., plugins, must not expect or depend upon an available {@code Activity} at
30
* the time that this method is invoked.
31
*
32
* @param flutterEngine The Flutter engine.
33
*/
34
void
configureFlutterEngine
(@NonNull
FlutterEngine
flutterEngine);
35
36
/**
37
* Cleans up references that were established in {@link #configureFlutterEngine(FlutterEngine)}
38
* before the host is destroyed or detached.
39
*
40
* @param flutterEngine The Flutter engine.
41
*/
42
void
cleanUpFlutterEngine
(@NonNull
FlutterEngine
flutterEngine);
43
}
io.flutter.embedding.engine.FlutterEngine
Definition:
FlutterEngine.java:83
io.flutter.embedding.android.FlutterEngineConfigurator
Definition:
FlutterEngineConfigurator.java:18
io.flutter.embedding.android.FlutterEngineConfigurator.cleanUpFlutterEngine
void cleanUpFlutterEngine(@NonNull FlutterEngine flutterEngine)
io.flutter.embedding.android.FlutterEngineConfigurator.configureFlutterEngine
void configureFlutterEngine(@NonNull FlutterEngine flutterEngine)
Generated on Sun Jun 23 2024 21:55:09 for Flutter Engine by
1.9.4