Stefan reported that opening a flow (hello) sometimes showed content from a different flow (extract-with-approval). Cause: flutter_code_editor's CodeController distinguishes between `text` (the visible buffer, post-fold) and `fullText` (the underlying source). Setting `_code.text = newFile` only updates the visible buffer; the underlying `_code` data structure retains the previous file's source, so subsequent folding/scrolling can surface its content. Switch all three load sites + the save site to the canonical setter: Before _code.text = text (visible buffer only) After _code.fullText = text (replaces underlying source) Save also moves to writing `_code.fullText` so any text the operator collapsed behind a fold survives the round-trip. Verified against flutter_code_editor 0.3.5 source — the fullText setter calls `_updateCodeIfChanged` then re-emits `TextEditingValue(text: _code.visibleText)`, which is the documented "fully reset the editor" path. Bump version 0.1.1 → 0.1.2. Studio's pubspec already pins `ref: main` so the next `flutter pub upgrade` picks it up. Signed-off-by: flemming-it <sf@flemming.it> |
||
|---|---|---|
| .. | ||
| src | ||
| fai_studio_flow_editor.dart | ||