Skip to content

Commit

Permalink
fix spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
rmi22186 committed Nov 27, 2024
1 parent 7eb0419 commit c39b7c8
Showing 1 changed file with 15 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -800,24 +800,23 @@ class MparticleFlutterSdkPlugin: FlutterPlugin, MethodCallHandler {
.put("timestamp", timestamp)

fun MethodCall.toCCPAConsent(result: Result): CCPAConsent? {
return try {
argument<Boolean>("consented")?.let {
CCPAConsent.builder(it)
.document(argument<String>("document"))
.hardwareId(argument<String>("hardwareId"))
.location(argument<String>("location"))
.timestamp(argument<Long>("timestamp"))
.build()
return try {
argument<Boolean>("consented")?.let { consented ->
CCPAConsent.builder(consented)
.document(argument<String>("document"))
.hardwareId(argument<String>("hardwareId"))
.location(argument<String>("location"))
.timestamp(argument<Long>("timestamp"))
.build()
} ?: run {
result.error(TAG, "Missing \"consented\" value for arguments: $arguments", null)
null
}
} catch (ex: Exception) {
result.error(TAG, ex.message, null)
null
}
?: run {
result.error(TAG, "Missing \"consented\" value for arguments: $arguments", null)
null
}
} catch (ex: Exception) {
result.error(TAG, ex.message, null)
null
}
}


fun MethodCall.toGDPRConsent(result: Result): Pair<String, GDPRConsent>? {
Expand Down

0 comments on commit c39b7c8

Please sign in to comment.