HomeX-It / snowplow-flutter-tracker

Snowplow event tracker for Flutter. Add analytics to your Flutter apps and games http://snowplowanalytics.com
MIT License
5 stars 7 forks source link

Fixes attaching contexts to structured and unstructured events #32

Closed ohitsdaniel closed 3 years ago

ohitsdaniel commented 3 years ago

Sending a structured/unstructured event without attached contexts crashed the application as snowplow-objc-tracker expects a non-null value in .setContexts().

Fixed by mapping (.let { it } for all Kotlin devs) .setContexts to the unwrapped contexts, making sure that only non-null values are passed to setContexts.

codecov[bot] commented 3 years ago

Codecov Report

Merging #32 (8179b5c) into main (b278370) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #32   +/-   ##
=======================================
  Coverage   21.13%   21.13%           
=======================================
  Files          28       28           
  Lines         672      672           
=======================================
  Hits          142      142           
  Misses        530      530           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b278370...8179b5c. Read the comment docs.