assertInstallableScope function
Assert that a scope is valid for install/uninstall/enable/disable.
Throws ArgumentError if scope is PluginScope.managed.
Implementation
void assertInstallableScope(PluginScope scope) {
if (!validInstallableScopes.contains(scope)) {
throw ArgumentError(
'Invalid scope "${scope.name}". Must be one of: '
'${validInstallableScopes.map((s) => s.name).join(', ')}',
);
}
}