findCommandByType<T extends AFCommand> method

AFCommand? findCommandByType<T extends AFCommand>()

Implementation

AFCommand? findCommandByType<T extends AFCommand>() {
  final result = commands.all.firstWhereOrNull((c) => c is T);
  return result;
}