interactive_svg library

Classes

BoundsFactory
An abstract factory that computes and exposes SVG region bounds.
BoundsTestPainter
A CustomPainter used to visualize touchable areas for testing purposes.
InteractiveParseContext
Holds parsed XML state for an SVG document.
InteractiveParserDelegate
Abstract delegate responsible for loading and parsing SVG assets for interactive usage.
InteractiveSelector
An abstract representation of a selector used to identify SVG elements or groups.
InteractiveSelectorByID
A selector that matches SVG elements by their id attribute.
InteractiveSelectorByIDAndParent
A selector that matches SVG elements by id and whose parent element matches another selector.
InteractiveSvgView
A widget that renders an SVG asset and exposes interactive regions via InteractiveSelector.
SvgBounds
Represents the hit-testable geometry for a parsed SVG region.
SvgRegion
Represents a fragment of SVG content associated with an optional selector.
SvgRegionsDetails
Provides metadata about a parsed SVG region passed to interactiveBuilder.

Enums

InteractiveType
The type of interactivity for a selector region.

Extensions

$InteractiveParseContextCopyWith on InteractiveParseContext
PathExtension on Path
Extension methods for Path to compute visible bounds.

Functions

getPathBounds(Path path) Rect
Computes an axis-aligned bounding Rect that encloses the visible points of path.

Typedefs

BoundsList = LinkedHashMap<InteractiveSelector, SvgBounds>
Mapping of interactive selectors to their computed hit-test bounds.
ErrorBuilder = Widget Function(BuildContext context, Object? error, StackTrace? stackTrace)
Builder used to render an error state when SVG loading/parsing fails.
InteractiveBuilder = Widget Function(BuildContext context, Widget builder(), SvgRegionsDetails details)
Builder used to wrap or decorate a parsed SVG region.
MarkerBuilder = List<Widget> Function(BuildContext context)
Builder that produces additional overlay widgets (markers) to be placed on top of the SVG.
RegionList = LinkedHashMap<InteractiveSelector?, SvgRegion>
Mapping of optional selector -> SvgRegion fragments.