attach static method
Creates and starts a lifecycle controller.
Implementation
static HardwareLifecycleController attach(
NexoraSdk sdk, {
bool autoStopOnPause = true,
bool stopCamera = true,
bool stopAudio = true,
bool stopBluetoothScan = true,
bool stopLocation = true,
bool stopSensors = true,
bool stopLogging = true,
}) {
final controller = HardwareLifecycleController._(
sdk: sdk,
autoStopOnPause: autoStopOnPause,
stopCamera: stopCamera,
stopAudio: stopAudio,
stopBluetoothScan: stopBluetoothScan,
stopLocation: stopLocation,
stopSensors: stopSensors,
stopLogging: stopLogging,
)..start();
return controller;
}