The append-only AST trick that makes Flutter AI chat actually smooth Here is a factual summary of the article: The article explains that the `flutter_markdown` package causes visual glitches in AI chat apps because it re-parses the entire response string on every new token, resulting in O(n²) work. The fix is an append-only AST with monotonic node IDs used as Flutter widget keys, which ensures that only the trailing open node is rebuilt on each new chunk. This approach, packaged as `streamdown`, is 188× faster on chunked input and eliminates all visible flicker. — flutter markdown re-parses the entire response string on every streamed token. The fix is an append-only AST with monotonic node IDs used as Flutter widget keys. I packaged it as — a drop-in replacement that's streamdown 188× fasteron chunked input and produces zero visible flicker. Live on pub.dev today. The problem Every ChatGPT-style Flutter app I built had the same broken-feeling moment: code blocks flashing unstyled → styled → unstyled, tables jittering as new cells arrive, scroll position breaking, and the cursor jumping around like the UI is fighting itself. The root cause is one line, repeated thousands of times during a single streamed response: js StreamBuilder