onDuplicate method
Handles duplicate entries with the given name and existing value.
Returns true if the existing entry should be overridden.
Implementation
@override
bool onDuplicate(
String name,
StorageDriverRegistration existing,
bool overrideExisting,
) {
if (!overrideExisting) {
return false;
}
throw ProviderConfigException(
'Storage driver "$name" is already registered.'
'${duplicateDiagnostics(name)}',
);
}