fromStringValue static method
Converts a string value to a corresponding GiphyKeyboardAppearance enum value.
Throws an ArgumentError if the given string does not match any GiphyKeyboardAppearance values.
value
The string representation of the keyboard appearance.
Returns the matching GiphyKeyboardAppearance value.
Implementation
static GiphyKeyboardAppearance fromStringValue(String value) {
switch (value) {
case 'defaultAppearance':
return GiphyKeyboardAppearance.defaultAppearance;
case 'dark':
return GiphyKeyboardAppearance.dark;
case 'light':
return GiphyKeyboardAppearance.light;
default:
throw ArgumentError('Unknown KeyboardAppearance value: $value');
}
}