legendBuilder property
@en: legend component builder
@zh: 图例组件
Implementation
PositionComponent Function(Color color, int i) legendBuilder = (color, i) {
return RectangleComponent.fromRect(Rect.fromLTWH(40, 50.0 + 30 * i, 30, 18),
paint: Paint()..color = color);
};