encodeSnackBarBehavior static method
Encodes the given value
to the String representation. Supported values
are:
fixed
floating
All other values, including null
, will result in null
.
Implementation
static String? encodeSnackBarBehavior(SnackBarBehavior? value) {
String? result;
if (value != null) {
switch (value) {
case SnackBarBehavior.fixed:
result = 'fixed';
break;
case SnackBarBehavior.floating:
result = 'floating';
break;
}
}
return _stripDynamicNull(result);
}