walkCommands method

  1. @override
Iterable<ChatCommand> walkCommands()
inherited

Returns an iterable that recursively iterates over all the Commands in this group.

This will return all the Commands in this group, whether they be direct children or children of children. If you want all the direct Command children, consider using children.whereType<ICommand>() instead.

Implementation

@override
Iterable<ChatCommand> walkCommands() sync* {
  if (this is ChatCommand) {
    yield this as ChatCommand;
  }

  for (final child in children) {
    yield* child.walkCommands();
  }
}