class

MyPlugin

implements

FlutterPlugin

ActivityAware

//...normal plugin behavior is hidden...

@Override

public

void

onAttachedToActivity

ActivityPluginBinding

activityPluginBinding

// TODO: your plugin is now attached to an Activity

@Override

public

void

onDetachedFromActivityForConfigChanges

()

// TODO: the Activity your plugin was attached to was

// destroyed to change configuration.

// This call will be followed by onReattachedToActivityForConfigChanges().

@Override

public

void

onReattachedToActivityForConfigChanges

ActivityPluginBinding

activityPluginBinding