Rough Notation은 CustomPainter를 사용하여 위젯에 애니메이션 처리된 손그림 스타일의 주석을 추가할 수 있는 Flutter 패키지입니다. Rough Notation 자바스크립트 라이브러리에서 영감을 받아 텍스트와 UI 요소에 스케치 같은 표현력 있는 외관을 제공합니다. 동적이고 스타일화된 선과 도형으로 콘텐츠의 중요한 부분을 강조하는 데 이상적입니다. Android, iOS, Web, macOS, Windows, Linux 등 여러 플랫폼을 지원하여 크로스플랫폼 앱에 유용합니다. 리치 텍스트, 마크다운, HTML 에디터와도 원활하게 통합됩니다.
사용 사례
교육 앱에서 중요한 텍스트 강조하기
인터랙티브 튜토리얼에 표현적인 주석 추가하기
손그림 스타일 효과로 UI 향상
다시보드에서 데이터 포인트 시각화
매력적인 온보딩 경험 만들기
동적 마커를 사용한 마크다운 콘텐츠 스타일링
주요 기능
애니메이션된 손그림 스타일 라인
사용자 정의 가능한 테두리 및 채우기 속성
여러 주석 유형(밑줄, 박스, 원) 지원
CustomPainter와의 내장 통합
크로스 플랫폼 호환성
pub add 명령을 통한 간편한 설정
적합한 대상
교육 및 학습 응용 프로그램
시각적 피드백이 있는 인터랙티브 UI
표현력 있는 UI 요소를 찾는 디자이너
풍부한 텍스트 편집기를 구축하는 개발자
유머나 예술적인 주석이 필요한 앱
고려 사항
많은 주석이 있는 경우 성능에 영향을 줄 수 있습니다
CustomPainter 기본 사항을 이해해야 합니다
2D 캔버스 렌더링에 제한
고성능 애니메이션에 적합하지 않음
정적 또는 낮은 빈도의 업데이트에 가장 적합
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
RoughNotation Flutter
A lightweight Flutter package to create animated, hand-drawn-style annotations on widgets.
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: