lookupAction method
Implementation
Future<Action?> lookupAction(String actionType, String name) async {
final key = _getKey(actionType, name);
if (_actions.containsKey(key)) {
return _actions[key];
}
final separatorIndex = name.indexOf('/');
if (separatorIndex > 0 && separatorIndex < name.length - 1) {
final pluginName = name.substring(0, separatorIndex);
final resolvedActionName = name.substring(separatorIndex + 1);
for (final plugin in _plugins) {
if (plugin.name == pluginName) {
await _ensurePluginInitialized(plugin);
// The action might have been registered during init.
if (_actions.containsKey(key)) {
return _actions[key];
}
final action = plugin.resolve(actionType, resolvedActionName);
if (action != null) {
register(action);
return action;
}
}
}
}
return parent?.lookupAction(actionType, name);
}