StaticHandlerConfig class

Configuration for the static file handler.

Constructors

StaticHandlerConfig({required String path, bool enableCaching = true, int maxAge = 86400, int htmlMaxAge = 0, bool enableCompression = true, bool listDirectories = false, String? defaultFile = 'index.html'})
Creates static handler configuration.
const

Properties

defaultFile String?
Default file to serve when a directory is requested.
final
enableCaching bool
Whether to enable caching headers.
final
enableCompression bool
Whether to enable gzip compression.
final
hashCode int
The hash code for this object.
no setterinherited
htmlMaxAge int
Cache-Control max-age in seconds for HTML files (typically shorter).
final
listDirectories bool
Whether to list directory contents when a directory is requested.
final
maxAge int
Cache-Control max-age in seconds for cacheable files.
final
path String
The directory to serve files from.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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