VirtualPiano class
Constructors
VirtualPiano ({Key ? key , required RangeValues noteRange , List <HighlightedNoteSet > ? highlightedNoteSets , dynamic onNotePressed (int , double )?, dynamic onNotePressSlide (int , double )?, dynamic onNoteReleased (int )?, Color whiteKeyColor = Colors.white , Color blackKeyColor = Colors.black , double elevation = 2 , double borderWidth = 0.5 , double keyHighlightColorBlend = 0.8 , bool showKeyLabels = false })
const
Properties
blackKeyColor
→ Color
The color to render black keys.
final
borderWidth
→ double
The width of the border around each key
final
elevation
→ double
The (material) elevation of the piano keys
final
hashCode
→ int
The hash code for this object.
no setter inherited
highlightedNoteSets
→ List <HighlightedNoteSet > ?
A list of sets of notes to be highlighted (colored).
final
key
→ Key ?
Controls how one widget replaces another widget in the tree.
final inherited
keyHighlightColorBlend
→ double
The blend between keys highlight color and base color
final
noteRange
→ RangeValues
The range of notes to render on the Piano.
Note ranges are defined by their MIDI note values, so a value of 0 equals C-1 and a value of 127 equals G9.
Values outside of this 0..127 range are invalid.
final
onNotePressed
→ dynamic Function(int , double ) ?
Called when a key is pressed/touched.
Parameters are the note of the key (int) and the vertical position of the touch on the key (double)
final
onNotePressSlide
→ dynamic Function(int , double ) ?
Called when a vertical drag/slide is performed on a key.
Parameters are the note of the key (int) and the vertical position of the drag on the key (double)
final
onNoteReleased
→ dynamic Function(int ) ?
Called when a key is released.
final
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
showKeyLabels
→ bool
Show key labels on the keys
final
whiteKeyColor
→ Color
The color to render white keys.
final
flutter_virtual_piano 0.0.9