FileFetcher class

A basic file fetcher implementation (using 'dart:io', not working on web).

This fetcher requires that references used on fetch methods are relative paths.

Inheritance
Mixed in types

Constructors

FileFetcher.basePath(String path, {Encoding encoding = utf8, String? contentType})
Create a file fetcher with base path, normally refering to a directory.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

fetch(Uri reference) Future<FileContent>
Fetch (read fully) content body from a resource identified by reference.
override
fetchBytes(Uri reference) Future<Uint8List>
Fetch content body as bytes from a resource identified by reference.
inherited
fetchJson(Uri reference, {Object? reviver(Object? key, Object? value)?}) Future
Fetch content body as JSON data from a resource identified by reference.
inherited
fetchStream(Uri reference) Future<FileContent>
Fetch content as a stream from a resource identified by reference.
override
fetchText(Uri reference) Future<String>
Fetch content body as text from a resource identified by reference.
inherited
headers(Map<String, String> headers) FileFetcher
Ignore given headers on this version of the FileFetcher.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited