SightDirection constructor

const SightDirection(
  1. SightDirectionKind kind, {
  2. required int measure,
  3. required int tick,
  4. required int staff,
  5. String? level,
  6. String? text,
})

Implementation

const SightDirection(
  this.kind, {
  required this.measure,
  required this.tick,
  required this.staff,
  this.level,
  this.text,
}) : assert(
       (kind == SightDirectionKind.dynamics) == (level != null),
       'só a dinâmica tem nível',
     ),
     assert(
       (kind == SightDirectionKind.words) == (text != null),
       'só o texto tem texto',
     );