Skip to content

Commit

Permalink
chore(analytics): updated pinpoint native pigeon breaking changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tyllark committed Dec 4, 2024
1 parent e46de38 commit 4033a70
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ class AmplifyAnalyticsPinpointPlugin: FlutterPlugin, Messages.PinpointLegacyData

override fun onAttachedToEngine(binding: FlutterPlugin.FlutterPluginBinding) {
context = binding.applicationContext
Messages.PinpointLegacyDataProvider.setup(binding.binaryMessenger, this)
Messages.PinpointLegacyDataProvider.setUp(binding.binaryMessenger, this)
}

override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) {
Messages.PinpointLegacyDataProvider.setup(binding.binaryMessenger, null)
Messages.PinpointLegacyDataProvider.setUp(binding.binaryMessenger, null)
context = null
}

override fun getEndpointId(pinpointAppId: String, result: Messages.Result<String?>){
override fun getEndpointId(pinpointAppId: String, result: Messages.NullableResult<String?>){
if (context == null) {
result.error(Exception("Application context is null"))
return
Expand Down

0 comments on commit 4033a70

Please sign in to comment.