init method

Future<void> init(
  1. dynamic showErrorCallback(
    1. String
    )
)

//////////// //////////// Initialize the location service with a callback for showing errors

Implementation

// II.B - Initialization
///////////////
/// Initialize the location service with a callback for showing errors
Future<void> init(Function(String) showErrorCallback) async {
  debugPrint("[DEBUG] Initializing location service at ${DateTime.now()}");
  _showErrorCallback = showErrorCallback;

  // Initialize the foreground service
  if (_useForegroundService) {
    await _foregroundService.initForegroundTask();
    debugPrint("[DEBUG] Foreground service initialized at ${DateTime.now()}");
  }
}