Editing & clipboard
Selection, clipboard, fill, undo/redo, and the fill gestures.
Selection, clipboard, fill
await sm.copySelectionToClipboard(); // range -> TSV on the clipboard
await sm.cutSelectionToClipboard();
await sm.pasteFromClipboard(); // spills from the current cell
sm.rangeAsTsv(); // selected range as text
sm.fillSelection('★'); // fill the range (read-only cells skipped)
Undo / redo / find / go-to / notes
sm.canUndo; sm.undo(); sm.canRedo; sm.redo();
final hits = sm.find('Ada'); if (hits.isNotEmpty) sm.setCurrentCell(hits.first);
sm.goToRow(2); // jump to a displayed row
sm.setCurrentCellNote('review this'); sm.noteFor(sm.currentCell!);
Series fill / flash fill
// Seed a pattern, select the column, extend it (2,4 -> 6,8,10…).
sm.setCurrentCell(rows.first.cells['n']!);
sm.extendSelectionTo(rows.last.cells['n']!);
sm.fillSeriesDown();
// Flash fill: seed one example, infer the transform for the rest.
sm.flashFillDown();