activity

@NonNull

Lifecycle

lifecycle

);

The existing deprecated method with the Activity
parameter was removed in Flutter 2.

Context

In order for custom Activities to also supply the Activity
lifecycle events Flutter plugins expect using the
ActivityAware interface, the FlutterEngine
exposed a getActivityControlSurface() API.

This allows custom Activities to signal to the engine
(with which it has a (0|1):1 relationship) that
it was being attached or detached from the engine.

Note:
  This lifecycle signaling is done automatically when you
  use the engine’s bundled FlutterActivity
  or FlutterFragment, which should be the most
  common case.