searchActions method

List<NodeFlowAction<T>> searchActions(
  1. String query
)

Searches for actions matching a query string.

Searches action labels, descriptions, and IDs (case-insensitive). Useful for implementing command palettes or search interfaces.

Parameters:

  • query: The search query string

Returns: List of actions matching the query

Example:

final results = manager.searchActions('align');
// Returns all alignment-related actions

Implementation

List<NodeFlowAction<T>> searchActions(String query) {
  final lowerQuery = query.toLowerCase();
  return _actions.values
      .where(
        (action) =>
            action.label.toLowerCase().contains(lowerQuery) ||
            action.description?.toLowerCase().contains(lowerQuery) == true ||
            action.id.toLowerCase().contains(lowerQuery),
      )
      .toList();
}