blob: ff4d32f19ef695f4d37a17f089e47644bf9ee5eb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
import '../state/game_state.dart';
import 'command_l10n.dart';
/// Adds a [NoteRow] to the main list. If the note is linked, the list's reflow
/// step positions it directly beneath its target; otherwise it is appended.
class AddNoteRowCommand extends Command {
AddNoteRowCommand(this.noteRow, {required GameState gameState})
: _gameState = gameState;
final NoteRow noteRow;
final GameState _gameState;
@override
void execute() {
RoundMethods.addToMainList(
stateAccess,
null,
noteRow,
gameState: _gameState,
);
}
@override
String describe() {
return commandL10n.cmdAddNoteRow;
}
}
|