parse static method
Parses the provider: key.
Implementation
static NotifyProvider parse(String? value) {
switch (value?.toLowerCase().trim()) {
case 'slack':
return NotifyProvider.slack;
case 'discord':
return NotifyProvider.discord;
case 'telegram':
return NotifyProvider.telegram;
case null:
case '':
case 'webhook':
return NotifyProvider.webhook;
default:
throw ArgumentError(
"Invalid notification provider '$value'. "
"Expected one of: slack, discord, telegram, webhook.",
);
}
}