It uses Flutter’s CustomPainter to render the annotations, supporting config options for styling and animation — including manual triggers, sequencing via groups, and autoplay.
It doesn't matter where widgets are in the widget tree — grouped annotations can live inside deeply nested widgets or even different build scopes. The registry handles sequencing regardless of position.
From Flutter 3.16+, deferred or conditionally built widgets (e.g., in a ListView.builder) won’t throw errors but will skip animations until built.
Delays & Durations: Group sequencing introduces its own delays between elements. Avoid adding large delay values on individual annotations if part of a group.
Controllers & Autoplay: If using RoughAnnotationController(autoPlay: true), ensure the widget is built first. Internally, we use addPostFrameCallback to delay the trigger.
Multiple Controllers: You can reuse the same controller for multiple widgets, but only one annotation may render if others haven't mounted yet.
Lazy Lists / Builders: Widgets in a ListView.builder or similar builders that are not yet mounted will not animate. No crash, but no effect either.
Visual Misalignments: Styling mismatches may occur across platforms. Future updates will improve drawing precision and painter logic.
🧠 What's Next
We’re aiming to improve:
Core painter logic for smoother lines and curves (lib/src/painters)
Extend features and stability of annotation widgets (lib/src/annotations)
Also the controllers & grouped behaviour (lib/src/controllers)
The original JS library uses roughjs. Although there's a Flutter version (rough), it’s outdated and Dart 3 incompatible.
We’re considering reviving or reimplementing it in parts. All contributions are welcome!
If you're looking to contribute, ideal places to start are: