PlatformViewRegistry

PlatformViewFactory

PlatformView

Finally, modify your build.gradle file
to require one of the minimal Android SDK versions:

android

defaultConfig

minSdkVersion

19

// if using hybrid composition

minSdkVersion

20

// if using virtual display.

Performance

Platform views in Flutter come with performance trade-offs.

For example, in a typical Flutter app, the Flutter UI is composed
on a dedicated raster thread. This allows Flutter apps to be fast,
as the main platform thread is rarely blocked.

While a platform view is rendered with hybrid composition,
the Flutter UI is composed from the platform thread,
which competes with other tasks like handling OS or plugin messages.