I am trying to use dart-io to read and write file. I am getting below exception.
Uncaught Error: Unsupported operation: _Namespace
at Object.dart.throw (dart_sdk.js:4537)
at Function.get _namespacePointer [as _namespacePointer] (dart_sdk.js:49364)
at Function._namespacePointer (dart_sdk.js:47224)
at Function._dispatchWithNamespace (dart_sdk.js:47227)
at io._File.new.open (dart_sdk.js:47342)
at new io._FileStreamConsumer.new (dart_sdk.js:47186)
at io._File.new.openWrite (dart_sdk.js:47468)
at refresh (main.dart:15)
at refresh.next (<anonymous>)
at runBody (dart_sdk.js:22264)
at Object.async.async (dart_sdk.js:22292)
at main.refresh (main.dart:13)
at Object.dart._checkAndCall (dart_sdk.js:4731)
at Object.dart.dcall (dart_sdk.js:4736)
Code I used final output = io.File('output.txt').openWrite(); output.write(output_data);
Could you please help me in fixing it.
Or any other way to read and write files using dart in a web application.
Aucun commentaire:
Enregistrer un commentaire