Skip to content

Commit

Permalink
Fixes jfacoustic#17: MethodChannel.Result.error accepts a nullable Ob…
Browse files Browse the repository at this point in the history
…ject containing error details as its 3rd parameter and not an Activity
  • Loading branch information
gkontokotsios authored Oct 18, 2023
1 parent ea47850 commit 15ff822
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class FlutterAuth0ClientPlugin() : FlutterPlugin, MethodCallHandler, ActivityAwa
loginMethod.start(this.activity!!, object : Callback<Credentials, AuthenticationException> {
// Called when there is an authentication failure
override fun onFailure(exception: AuthenticationException) {
result.error("AuthenticationException", exception.message, activity)
result.error("AuthenticationException", exception.message, null)
}

// Called when authentication completed successfully
Expand All @@ -94,7 +94,7 @@ class FlutterAuth0ClientPlugin() : FlutterPlugin, MethodCallHandler, ActivityAwa
}
})
} catch (e: Exception) {
result.error("AuthenticationException", e.message, activity)
result.error("AuthenticationException", e.message, null)
}
}

Expand Down

0 comments on commit 15ff822

Please sign in to comment.