context<T> method

CommandDefinitionBuilder context<T>(
  1. String key,
  2. dynamic fn(
    1. T
    )
)

Implementation

CommandDefinitionBuilder context<T>(String key, Function(T) fn) {
  final command =
      _commandMapper.entries.firstWhere((element) => element.key == key);
  fn(command.value());

  return this;
}