Skip to content

Commit

Permalink
Converted sessionDropInCallback into class property
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert-SD committed Oct 9, 2023
1 parent 29dc2b3 commit 70f0514
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class AdyenCheckoutPlugin : FlutterPlugin, ActivityAware {
when (event) {
Lifecycle.Event.ON_CREATE -> {
checkoutPlatformApi?.dropInSessionLauncher =
DropIn.registerForDropInResult(fragmentActivity, sessionDropInCallback())
DropIn.registerForDropInResult(fragmentActivity, sessionDropInCallback)
checkoutPlatformApi?.dropInAdvancedFlowLauncher = DropIn.registerForDropInResult(
fragmentActivity, dropInAdvancedFlowCallback
)
Expand All @@ -80,7 +80,7 @@ class AdyenCheckoutPlugin : FlutterPlugin, ActivityAware {
}
}

private fun sessionDropInCallback() = SessionDropInCallback { sessionDropInResult ->
private val sessionDropInCallback = SessionDropInCallback { sessionDropInResult ->
if (sessionDropInResult == null) {
return@SessionDropInCallback
}
Expand Down

0 comments on commit 70f0514

Please sign in to comment.