initialize static method
Initializes the SDK and sets up the necessary services.
This method should be called before using any other methods. It configures BLE device discovery, connectivity handlers, and scanner settings.
Implementation
static Future<void> initialize() async {
if (_isInitialized) {
_appLogger.warning("OptiConnect SDK is already initialized.");
return;
}
configureSdkDependencyInjection();
_scannerSettings = getIt<ScannerSettings>();
_settingsHandler = getIt<SettingsHandler>();
_scannerFeedback = getIt<ScannerFeedback>();
_bluetoothManager = getIt<BluetoothManager>();
_scannerInfo = getIt<ScannerInfo>();
await _settingsHandler.initialize();
_appLogger = getIt<AppLogger>();
_isInitialized = true;
}