CommandList<T>.str constructor

CommandList<T>.str(
  1. String str
)

Implementation

CommandList.str(String str)
    : _commands = str
          .replaceAll(RegExp(r'[ \t]{2,}'), '')
          .split('\n')
          .where((i) => i.isNotEmpty && i != ' ')
          .map((x) => Command(x))
          .toList();