StaticHandlerConfig constructor

const StaticHandlerConfig({
  1. required String path,
  2. bool enableCaching = true,
  3. int maxAge = 86400,
  4. int htmlMaxAge = 0,
  5. bool enableCompression = true,
  6. bool listDirectories = false,
  7. String? defaultFile = 'index.html',
})

Creates static handler configuration.

Implementation

const StaticHandlerConfig({
  required this.path,
  this.enableCaching = true,
  this.maxAge = 86400, // 1 day
  this.htmlMaxAge = 0, // No caching for HTML by default
  this.enableCompression = true,
  this.listDirectories = false,
  this.defaultFile = 'index.html',
});