onDownloadScript property
Callback function invoked when the user requests to download the current script view (e.g., Java code) of the DartBlockProgram as a file.
Receives the script's content as well as a suggested file name (including its extension) to save it under.
This package intentionally does not depend on a file-saving package (e.g., file_picker) itself; integrate one of your choosing in this callback.
If null, the associated download button is hidden from the script view's toolbar.
Implementation
final void Function(String scriptContent, String suggestedFileName)?
onDownloadScript;