startNativeTracking method

  1. @override
Future<void> startNativeTracking(
  1. LocationConfig config
)
override

Starts native location tracking with the given configuration.

Implementation

@override
Future<void> startNativeTracking(LocationConfig config) async {
  try {
    await methodChannel.invokeMethod('startTracking', {
      'timeIntervalSeconds': config.timeIntervalSeconds,
    });
  } on PlatformException catch (e) {
    throw LocationPlatformException(
      message: e.message ?? 'Failed to start tracking',
      code: e.code,
    );
  }
}