FileContentSource constructor

FileContentSource(
  1. File file, {
  2. String? name,
  3. String? contentType,
})

Creates a source for file; name defaults to the file name.

Implementation

FileContentSource(this.file, {String? name, this.contentType})
  : name = name ?? file.uri.pathSegments.last,
    length = file.lengthSync();