FileSource constructor

FileSource(
  1. File file, [
  2. Uri? uri
])

Initialize a newly created source object to represent the given file. If a uri is given, then it will be used as the URI from which the source was derived, otherwise a file: URI will be created based on the file.

Implementation

FileSource(this.file, [Uri? uri])
    : uri = uri ?? file.toUri(),
      id = _idTable.putIfAbsent(
          '${uri ?? file.toUri()}@${file.path}', () => _idTable.length);