encodeSliderComponentShape static method
Encodes the given value
to the String representation. Supported values
are:
noOverlay
All other values, including null
, will result in null
.
Implementation
static String? encodeSliderComponentShape(
SliderComponentShape? value,
) {
String? result;
if (value != null) {
// This one's a bit strange because both noOverlay and noThumb actually
// point to the exact same no-op class, so there's no way to tell them
// apart. Might as well just pick the one that comes first
// alphabetically.
if (value.runtimeType == SliderComponentShape.noOverlay.runtimeType) {
result = 'noOverlay';
}
}
return result;
}