captureEnabled property

bool get captureEnabled

Compatibility view over the diagnostic-session state machine.

Implementation

bool get captureEnabled => _sessionState == ArgosSessionState.recording;
set captureEnabled (bool enabled)

Implementation

set captureEnabled(bool enabled) {
  if (enabled) {
    if (_sessionState == ArgosSessionState.paused) {
      resumeSession();
    } else if (_sessionState == ArgosSessionState.idle) {
      startSession();
    }
  } else if (_sessionState == ArgosSessionState.recording) {
    pauseSession();
  }
}