timeout property

int? timeout
final

HTTP request timeout in milliseconds.

HTTP request timeouts will fire the BackgroundGeolocation.onHttp. Defaults to 60000 ms.

BackgroundGeolocation.onHttp((HttpEvent response) {
  bool success = response.success;
  if (!success) {
    print('[onHttp] FAILURE: ${response}');
  }
});

BackgroundGeolocation.ready(Config(
  http: HttpConfig(
    url: 'https://my-server.com/locations',
    timeout: 3000
  )
));

Implementation

final int? timeout;