replace method
void
replace()
Replaces the currently selected match with the text in replaceInputController.
Implementation
void replace() {
if (_currentMatchIndex < 0 || _currentMatchIndex >= _matches.length) return;
final match = _matches[_currentMatchIndex];
_codeController.replaceRange(
match.start,
match.end,
replaceInputController.text,
);
}