Definition at line 10 of file PlatformViewsActivity.java.
void dev.flutter.scenarios.PlatformViewsActivity.configureFlutterEngine |
( |
@NonNull FlutterEngine |
flutterEngine | ) |
|
|
inline |
Hook for subclasses to easily configure a FlutterEngine
.
This method is called after provideFlutterEngine(Context)
.
All plugins listed in the app's pubspec are registered in the base implementation of this method unless the FlutterEngine for this activity was externally created. To avoid the automatic plugin registration for implicitly created FlutterEngines, override this method without invoking super(). To keep automatic plugin registration and further configure the FlutterEngine, override this method, invoke super(), and then configure the FlutterEngine as desired.
Reimplemented from dev.flutter.scenarios.TestableFlutterActivity.
Definition at line 20 of file PlatformViewsActivity.java.
20 {
21 super.configureFlutterEngine(flutterEngine);
22 flutterEngine
23 .getPlatformViewsController()
24 .getRegistry()
26
27 flutterEngine
28 .getPlatformViewsController()
29 .getRegistry()
30 .registerViewFactory(
SURFACE_VIEW_PV,
new SurfacePlatformViewFactory(
true));
31
32 flutterEngine
33 .getPlatformViewsController()
34 .getRegistry()
36
37 flutterEngine
38 .getPlatformViewsController()
39 .getRegistry()
40 .registerViewFactory(
TEXTURE_VIEW_PV,
new TexturePlatformViewFactory());
41 }