Skip to content

v1.1.2

Latest
Compare
Choose a tag to compare
@CorvusYe CorvusYe released this 16 Sep 17:23
· 16 commits to main since this release
  • feat: support specifying legends and legend text build.

    example

    Options()
        ..legendBuilder = (color, i) { // default
            return RectangleComponent.fromRect(
                Rect.fromLTWH(40, 50.0 + 30 * i, 30, 18),
                paint: Paint()..color = color,
            );
        }
        ..legendTextBuilder = (tag, i, color, position) { // default
            return TextComponent(
                text: tag,
                position: Vector2(position.x + 40, position.y - 6),
                // position: Vector2(position.x + 40, position.y - 2),
                // textRenderer: TextPaint(
                //   style: TextStyle(
                //     fontSize: 17.0,
                //     color: Colors.white,
                //   ),
                // ),
            );
        }

Full Changelog: v1.1.1...v1.1.2