Note.simple constructor

Note.simple(
  1. String notation,
  2. DurationType durationType, {
  3. int dots = 0,
})

Factory constructor para criar uma nota de forma simplificada

Exemplo:

Note.simple('C5', DurationType.quarter)
Note.simple('F#4', DurationType.half)
Note.simple('Bb3', DurationType.eighth)

Implementation

factory Note.simple(
  String notation,
  DurationType durationType, {
  int dots = 0,
}) {
  return Note(
    pitch: Pitch.fromString(notation),
    duration: Duration(durationType, dots: dots),
  );
}