generic_svg_selector 0.1.0
generic_svg_selector: ^0.1.0 copied to clipboard
A Flutter plugin to interactively select parts of any flat SVG by tapping. Supports dynamic ID extraction, mirror mode, and custom colors.
generic_svg_selector #
A Flutter plugin to interactively select parts of any flat SVG by tapping.
Features #
- Load any flat SVG file
- Tap to select/deselect paths
- Mirror mode (left/right sync)
- Custom colors
- Runtime ID extraction
Installation #
dependencies:
generic_svg_selector: ^0.1.0
Usage #
GenericSvgSelectorWidget(
assetPath: 'assets/body.svg',
selection: _selection,
onSelectionUpdated: (newSelection) {
setState(() => _selection = newSelection);
},
)
SVG Requirements #
- Flat SVG —
<path id="partName">elements - Every selectable path must have unique
id