setConfig static method

Future<State> setConfig(
  1. Config config
)

Re-configure the plugin's Config parameters.

The supplied Config will be appended to the current configuration and applied in real-time.

Example

BackgroundGeolocation.setConfig(Config(
  desiredAccuracy: Config.DESIRED_ACCURACY_HIGH,
  distanceFilter: 100.0,
  stopOnTerminate: false,
  startOnBoot: true
)).then((State state) {
  print('[setConfig] success: ${state}');
})

Implementation

static Future<State> setConfig(Config config) async {
  Map state =
      (await _methodChannel.invokeMapMethod('setConfig', config.toMap()))!;
  return State(state);
}