Flutter port of FlowToken — smooth animations for streaming LLM text and markdown.
Try the interactive Flutter web demo at flowtoken-flutter.undivisible.dev.
Inspired by the original React library; uses gpt_markdown for static rendering.
dependencies:
flowtoken_flutter:
git:
url: https://github.com/undivisible/flowtoken_flutter
ref: mainimport 'package:flowtoken_flutter/flowtoken_flutter.dart';
// Streaming assistant reply
AnimatedMarkdown(
content: streamBuffer,
separator: FlowTokenSeparator.diff,
animation: FlowTokenAnimation.fadeIn,
)
// Completed message — no animation
AnimatedMarkdown(
content: message,
animation: null,
)fadeIn, blurIn, typewriter, slideInFromLeft, fadeAndScale, rotateIn, bounceIn, elastic, colorTransition, highlight, blurAndSharpen, dropIn, slideUp, wave
duration, curve, and animationIterationCount are available on AnimatedText, AnimatedMarkdown, and AnimatedImage. AnimatedMarkdown also preserves the upstream code-copy and image animation behavior.
ISC — see FlowToken for the original concept.