Skip to content

Commit

Permalink
Used let for handling nullability
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert-SD committed Nov 27, 2023
1 parent 185a99a commit f11d5d1
Showing 1 changed file with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,13 @@ class AdyenCheckoutPlugin : FlutterPlugin, ActivityAware {
lifecycleReference?.lifecycle?.addObserver(it)
}

if (componentFlutterApi != null) {
componentFlutterApi?.let {
flutterPluginBinding?.platformViewRegistry?.registerViewFactory(
"cardComponentAdvancedFlow", CardAdvancedFlowComponentFactory(
fragmentActivity,
componentFlutterApi!!,
)
"cardComponentAdvancedFlow", CardAdvancedFlowComponentFactory(fragmentActivity, it)
)

flutterPluginBinding?.platformViewRegistry?.registerViewFactory(
"cardComponentSessionFlow", CardSessionFlowComponentFactory(
fragmentActivity,
componentFlutterApi!!,
)
"cardComponentSessionFlow", CardSessionFlowComponentFactory(fragmentActivity, it)
)
}
}
Expand Down

0 comments on commit f11d5d1

Please sign in to comment.