encodeButtonTextTheme static method
Encodes the given value
to the String representation. Supported values
are:
accent
normal
primary
All other values, including null
, will result in null
.
Implementation
static String? encodeButtonTextTheme(ButtonTextTheme? value) {
String? result;
if (value != null) {
switch (value) {
case ButtonTextTheme.accent:
result = 'accent';
break;
case ButtonTextTheme.normal:
result = 'normal';
break;
case ButtonTextTheme.primary:
result = 'primary';
break;
}
}
return result;
}