radarlabs / flutter-radar

Flutter package for Radar, the leading geofencing and location tracking platform
https://radar.io
Apache License 2.0
22 stars 13 forks source link

Fix background event listeners #61

Closed Jonny1987 closed 3 months ago

Jonny1987 commented 3 months ago

Event listeners don't work in background (when app is closed) if there is an isolate which has been created, since this creates a new flutter engine which creates a new instance of the flutter-radar plugin, and this recreates the method channel.

This change makes the method channel static and only creates it once