VoltaBracket class

Represents a volta bracket (1st/2nd ending) in music notation.

Volta brackets indicate alternative endings for a repeated section. The first time through a repeat the passage under bracket 1 is played; on the repeat the passage under bracket 2 is played instead.

Example:

final bracket = VoltaBracket(number: 1, length: 150.0);
print(bracket.displayLabel); // "1."

final custom = VoltaBracket(number: 1, length: 150.0, label: '1.-3.');
print(custom.displayLabel); // "1.-3."
Inheritance

Constructors

VoltaBracket({required int number, required double length, bool hasOpenEnd = false, String? label})
Creates a VoltaBracket.

Properties

displayLabel String
The text displayed inside the bracket.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasOpenEnd bool
Whether the bracket has an open right end (no closing vertical line).
final
label String?
Optional custom label text shown inside the bracket.
final
length double
The horizontal length of the bracket in logical pixels.
final
number int
The volta number (1 for first ending, 2 for second ending, etc.).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
xmlId String?
Identificador único MEI (xml:id). Opcional; necessário para elementos referenciados por outros via atributos de ligação do MEI v5.
getter/setter pairinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited