toMap method
Convert all the TouchBarItem data to a Map that will be used in the platform channel communication.
Implementation
@override
Map<String, dynamic> toMap() {
Map<String, dynamic> map = {
'id': id,
'type': type,
'children': children?.map((item) => item.toMap()).toList(),
};
map['onSelect'] = _onSelect;
map['onHighlight'] = _onHighlight;
map['showArrowButtons'] = showArrowButtons;
map['selectedStyle'] = selectedStyle.toString();
map['overlayStyle'] = overlayStyle.toString();
map['mode'] = mode.toString();
map['isContinuous'] = isContinuous;
map['unselectAfterHit'] = unselectAfterHit;
return map;
}