parse static method
Implementation
static CheckoutMode parse(String input) {
for (final mode in CheckoutMode.values) {
if (mode.name == input.toLowerCase()) {
return mode;
}
}
if (input == 'pub') {
return CheckoutMode.published;
}
throw ArgumentError(
'Invalid argument: $input: '
'Expected one of ${CheckoutMode.values}',
);
}