getSize function

int getSize(
  1. List<String> arguments
)

Get size as int from cli arguments

Implementation

int getSize(List<String> arguments) {
  var option = extractOption('-s', '--size', arguments);
  if (option != null && option.isNotEmpty) {
    var size = int.tryParse(option);
    if (size != null) {
      return size;
    }
  }
  return defaultSize;
}