Skip to content

Commit 0ff7f94

Browse files
Xerus19573Copilot
andauthored
Update android/src/main/kotlin/id/oddbit/flutter/facebook_app_events/FacebookAppEventsPlugin.kt
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 8495aee commit 0ff7f94

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

android/src/main/kotlin/id/oddbit/flutter/facebook_app_events/FacebookAppEventsPlugin.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ class FacebookAppEventsPlugin: FlutterPlugin, MethodCallHandler {
116116

117117
private fun handleLogEvent(call: MethodCall, result: Result) {
118118
val eventName = call.argument<String>("name")
119+
if (eventName == null) {
120+
result.error("INVALID_ARGUMENT", "Event name is required and cannot be null.", null)
121+
return
122+
}
119123
val parameters = call.argument<Map<String, Any>>("parameters")
120124
val valueToSum = call.argument<Double>("_valueToSum")
121125

0 commit comments

Comments
 (0)