Staff constructor

Staff({
  1. List<Measure>? measures,
  2. int lineCount = 5,
})

Creates a Staff with the given measures list.

lineCount defaults to 5 (standard CMN staff). Set to 1 for percussion, 4 for 4-string tablature, or 6 for guitar tablature.

If measures is omitted an empty list is used, and measures can be added later via add.

Implementation

Staff({List<Measure>? measures, this.lineCount = 5})
    : measures = measures ?? [];