The current implementation of the cross_file class for web deals with a "DOM Element" _target that is used to inject some DOM required to Save a XFile As... here.
That functionality should be stripped out of the XFile to a helper object (similar to everything else that is DOM-related), and the XFile delegate itself to this DOM helper when it needs to save:
/// Saves the data of this CrossFile at the location indicated by path.
/// For the web implementation, the path variable is ignored.
@override
Future<void> saveTo(String path) async {
domHelper.saveFileAs(this, path);
}
The current implementation of the cross_file class for web deals with a "DOM Element"
_targetthat is used to inject some DOM required to Save a XFile As... here.That functionality should be stripped out of the XFile to a helper object (similar to everything else that is DOM-related), and the XFile delegate itself to this DOM helper when it needs to save: