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>
23 lines
582 B
YAML
23 lines
582 B
YAML
name: fai_studio_flow_editor
|
|
description: Swappable inline YAML editor for F∆I Studio flows.
|
|
version: 0.1.2
|
|
publish_to: 'none'
|
|
repository: https://git.flemming.ai/fai/studio-flow-editor
|
|
|
|
environment:
|
|
sdk: ^3.11.0-200.1.beta
|
|
flutter: '>=3.30.0'
|
|
|
|
dependencies:
|
|
flutter:
|
|
sdk: flutter
|
|
# CodeMirror-style code editor + the highlight package's
|
|
# YAML grammar. Both are pure Dart so the editor stays
|
|
# WebView-free and ships in the same binary.
|
|
flutter_code_editor: ^0.3.5
|
|
highlight: ^0.7.0
|
|
|
|
dev_dependencies:
|
|
flutter_test:
|
|
sdk: flutter
|
|
flutter_lints: ^6.0.0
|