stopMacroRecording method
Stops recording and returns the captured macro.
Implementation
ProgramMacro stopMacroRecording() {
if (!_macroRecording) {
throw StateError('Macro recording is not active.');
}
_macroRecording = false;
_lastMacroEventAt = null;
return ProgramMacro(
List<ProgramReplayStep>.from(_macroSteps, growable: false),
);
}