extras property
Optional arbitrary key/values {}
applied to each recorded location.
Note: See HttpEvent for more information.
Example
BackgroundGeolocation.ready(Config(
url: 'https://my-server.com/locations',
extras: {
'route_id': 1234
},
params: {
'device_id': 'abc123'
}
));
Observing incoming requests at your server:
- POST /locations
{
"device_id": "abc123" // <-- params appended to root of JSON
"location": {
"coords": {
"latitude": 45.51927004945047,
"longitude": -73.61650072045029,
.
.
.
},
"extras": { // <-- extras appended to *each* location
"route_id": 1234
}
}
}
See also: HTTP Guide at HttpEvent.
Implementation
Map<String, dynamic>? extras;