StaticFilesHandler class
Files served directly to the user for a given URL, such as images, CSS stylesheets, or JavaScript source files.
Static file handlers describe which files in the application directory are static files, and which URLs serve them.
Constructors
Properties
- applicationReadable ↔ bool?
-
Whether files should also be uploaded as code data.
getter/setter pair
- expiration ↔ String?
-
Time a static file served by this handler should be cached by web proxies
and browsers.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
-
httpHeaders
↔ Map<
String, String> ? -
HTTP headers to use for all responses from these URLs.
getter/setter pair
- mimeType ↔ String?
-
MIME type used to serve all files served by this handler.Defaults to
file-specific MIME types, which are derived from each file's filename
extension.
getter/setter pair
- path ↔ String?
-
Path to the static files matched by the URL pattern, from the application
root directory.
getter/setter pair
- requireMatchingFile ↔ bool?
-
Whether this handler should match the request if the file referenced by
the handler does not exist.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- uploadPathRegex ↔ String?
-
Regular expression that matches the file paths for all files that should
be referenced by this handler.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited