Open jesussmile opened 2 years ago
I think you can't use lambda callback, use global or static callback instead
I think you can't use lambda callback, use global or static callback instead
Yes this is the, exact reason for getting this error
I think you can't use lambda callback, use global or static callback instead
Yes this is the, exact reason for getting this error
Hi habil! I am new to flutter and can't implement static or global call back can you please post your code snippet of this implementation?
Hi, you just need to declare a static function like below:
static void backgroundLocationCallBack(LocationDto location) {
// do smth with location data
}
Then pass it as an initial argument to the registerLocationUpdate
function like below:
BackgroundLocator.registerLocationUpdate(backgroundLocationCallBack,
autoStop: true,
disposeCallback: backgroundLocationDisposeCallBack,
iosSettings: iOS.IOSSettings(.......),
androidSettings: android.AndroidSettings(.......));
Hi, you just need to declare a static function like below:
static void backgroundLocationCallBack(LocationDto location) { // do smth with location data }
Then pass it as an initial argument to the
registerLocationUpdate
function like below:BackgroundLocator.registerLocationUpdate(backgroundLocationCallBack, autoStop: true, disposeCallback: backgroundLocationDisposeCallBack, iosSettings: iOS.IOSSettings(.......), androidSettings: android.AndroidSettings(.......));
Thank you sir! @Habil24 @janosroden
Hi! I am just trying out this plugin but keep running into the null check issue, here is my code
The error log