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

@ -19,6 +19,19 @@
import 'dart:typed_data';
/// A file chosen by the host's native picker for a flow file input.
class PickedFileData {
final String fileName;
final Uint8List bytes;
const PickedFileData({required this.fileName, required this.bytes});
}
/// Host-side native file picker. Returns null when the operator
/// cancels. When a host does not supply one, the Run tab falls back
/// to its manual path-entry dialog.
typedef PickFileCallback = Future<PickedFileData?> Function();
abstract class FlowRunDriver {
/// Trigger a run of [flowName] with the supplied inputs.
/// Text + file inputs come in separate maps so the host