putIfAbsentDescriptor<TAction extends Action<TParam, TResult> , TParam, TResult> method
ActionDescriptor<TAction, TParam, TResult>
putIfAbsentDescriptor<TAction extends Action<TParam, TResult> , TParam, TResult>(
- String permanentKey,
- TAction factory()
Implementation
ActionDescriptor<TAction, TParam, TResult> putIfAbsentDescriptor<
TAction extends Action<TParam, TResult>,
TParam,
TResult>(String permanentKey, TAction Function() factory) {
if (permanentKey.isEmpty) {
throw ArgumentError.value(permanentKey);
}
final descriptor = _actionDescriptors.putIfAbsent(
permanentKey,
() => ActionDescriptor<TAction, TParam, TResult>(
_makePath(permanentKey), factory))
as ActionDescriptor<TAction, TParam, TResult>;
return descriptor;
}