toggleCapture method
void
toggleCapture()
Starts a capture when idle/done, and stops a capture when recording.
Implementation
void toggleCapture() {
final state = stateListenable.value;
if (state is ApiInspectorIdle || state is ApiInspectorDone) {
_startRecording();
} else if (state is ApiInspectorRecording) {
_stopRecording();
}
}