Get activity reference in flutter plugin
问题 When I created a flutter plugin, there are two methods in the plugin class by default: override fun onAttachedToEngine(flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) and fun registerWith(registrar: Registrar) The comment on the file says : It is encouraged to share logic between onAttachedToEngine and registerWith to keep them functionally equivalent. Only one of onAttachedToEngine or registerWith will be called depending on the user's project. onAttachedToEngine or registerWith