feat(run): host-injected native file picker for flow file inputs

The Run tab asked the operator to type an absolute path into a text
field — with no file dialog anywhere. FlowEditorPage now accepts an
onPickFile callback (PickedFileData: name + bytes) that hosts wire
to their native picker; the path-entry dialog remains only as the
no-host fallback. 0.23.0.

Signed-off-by: flemming-it <sf@flemming.it>
This commit is contained in:
flemming-it 2026-07-17 01:04:40 +02:00
parent 9e73036d0e
commit ae09a55146
6 changed files with 52 additions and 6 deletions

View file

@ -101,6 +101,11 @@ class FlowEditorPage extends StatefulWidget {
/// silent no install button offered.
final List<String> storeCapabilities;
/// Host-side native file picker for the Run tab's file inputs.
/// Studio passes a real file dialog; null keeps the manual
/// path-entry fallback.
final PickFileCallback? onPickFile;
/// The host's active workspace/project slug (empty = "all
/// projects", no active workspace). Used only to flag a
/// mismatch when the open flow file declares a *different*
@ -126,6 +131,7 @@ class FlowEditorPage extends StatefulWidget {
this.storeCapabilities = const [],
this.activeProject = '',
this.onSwitchToFileProject,
this.onPickFile,
});
@override
@ -658,6 +664,7 @@ outputs:
controller: _controller,
strings: _l,
driver: widget.runDriver,
onPickFile: widget.onPickFile,
),
],
),