defaultConfig property
Default configuration as understood by the framework.
Implementation
@override
ConfigDefaults get defaultConfig {
final values = spec.defaultsWithRoot();
values['http'] = {
'middleware_sources': {
'routed.sessions': {
'global': ['routed.sessions.start'],
'groups': {
'web': ['routed.sessions.start'],
},
},
},
};
return ConfigDefaults(
docs: <ConfigDocEntry>[
...spec.docs().map((entry) {
if (entry.path == 'session.driver') {
return ConfigDocEntry(
path: entry.path,
type: entry.type,
description: entry.description,
example: entry.example,
deprecated: entry.deprecated,
optionsBuilder: () => SessionServiceProvider.availableDriverNames(
includeBuiltIns: true,
),
metadata: entry.metadata,
defaultValue: entry.defaultValue,
defaultValueBuilder: entry.defaultValueBuilder,
);
}
return entry;
}),
...SessionServiceProvider.driverDocumentation(),
const ConfigDocEntry(
path: 'http.middleware_sources',
type: 'map',
description:
'Session middleware references injected globally/groups.',
defaultValue: <String, Object?>{
'routed.sessions': <String, Object?>{
'global': <String>['routed.sessions.start'],
'groups': <String, Object?>{
'web': <String>['routed.sessions.start'],
},
},
},
),
],
values: values,
schemas: spec.schemaWithRoot(),
);
}