settingsOf<S extends Object> method
The current settings of the tool toolId (one of this kit's tools
with settings). Throws ArgumentError for another id or an S the
settings are not.
Implementation
@override
S settingsOf<S extends Object>(String toolId) {
final value = _settings[toolId];
if (value == null) {
throw ArgumentError.value(toolId, 'toolId', 'has no settings here');
}
if (value is! S) {
throw ArgumentError.value(
toolId, 'toolId', 'has settings of ${value.runtimeType}, not $S');
}
return value;
}