However, the previous API had the flaw that it didn’t
enforce exclusion between activities connecting to
the engine, thus enabling n:1 relationships between
the activity and the engine,
causing lifecycle cross-talk issues.

Description of change

After Issue #21272, instead of attaching your activity
to the FlutterEngine by using the:

void

attachToActivity

@NonNull

Activity

activity

@NonNull

Lifecycle

lifecycle

);

API, which is now deprecated, instead use:

void

attachToActivity

@NonNull

ExclusiveAppComponent

Activity

exclusiveActivity

@NonNull

Lifecycle

lifecycle

);