scroll_texts_widget 0.1.0
scroll_texts_widget: ^0.1.0 copied to clipboard
A highly efficient and modular Flutter widget for creating scrolling marquee text banners.
Changelog #
0.1.0 #
✨ Major Architecture & Performance Overhaul ✨
🚀 New Features & Enhancements #
- Dual Render Modes (
ScrollTextRenderMode):cached: Pre-measures singleTextPainterand uses GPU clipping with zero layout operations insidepaint().streaming: Implements a sliding window tokenizer and queue that measures and paints only the text chunks currently visible inside the viewport window, delivering $O(\text{viewport})$ constant memory overhead.auto: Dynamically engages streaming for long texts and cached for short texts.
ScrollTextsController:- Read real-time pixel
offset,maxScrollExtent, normalizedprogress(0.0to1.0),currentTextIndex,isPaused, andeffectiveRenderMode. - Programmatic controls:
jumpTo(double offset),jumpToText(int index, {double offset}),pause(),resume(), andtogglePause().
- Read real-time pixel
- Position Initialization & Event Callbacks:
- Added
initialScrollOffsetandinitialTextIndex. - Added
initialDelayto configure startup pause before first scroll begins. - Added
repeatto configure continuous playlist looping vs. single-pass playback. - Added
onScrollChanged(double offset, int textIndex)andonTextCompleted(int textIndex)callbacks.
- Added
🔧 Bug Fixes & Stability #
- Fixed
LateInitializationErrorthrown when disposing widget with an emptytextslist. - Fixed unmounted async execution exception during
pauseDurationby addingmountedguards. - Fixed inter-text pause cycling to guarantee subsequent texts begin scrolling after
pauseDuration. - Fixed dynamic mid-scroll render mode switching across
auto,cached, andstreamingmodes. - Implemented
didUpdateWidgetfor dynamic updates of texts, speed, text styles, and controllers. - Eliminated full-widget
setState()rebuilds on each ticker frame by repainting viaChangeNotifierlistenables directly onCustomPaint. - Added unbounded constraint fallback protection in
LayoutBuilder.
0.0.1 #
🎉 Initial Release 🎉
- Initial release with
ScrollTextsWidgetmarquee scrolling.