When making calls to CrFile.name, the following error is thrown:
Uncaught Error: Class 'File' has no instance method '[]'.
NoSuchMethodError : method not found: '[]'
Receiver: Instance of 'File'
Arguments: ["name"]
Stack Trace:
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:42)
#1 CrFile.name (package:chrome_gen/src/files.dart:336:29)
This happens because CrFile reads its values from jsProxy using map notation. At least when getting files using CrFileEntry.file(), the object passed to CrFile.fromProxy() is an HTML File object. So values should be read using dot notation.
When making calls to
CrFile.name
, the following error is thrown:This happens because
CrFile
reads its values fromjsProxy
using map notation. At least when getting files usingCrFileEntry.file()
, the object passed toCrFile.fromProxy()
is an HTMLFile
object. So values should be read using dot notation.