when method
void
when({
- required void onConstantFunctionPoints(),
- required void onLinearZoomFunctionPoints(),
- required void onLinearTiltFunctionPoints(),
- required void onBilinearFunctionMatrix(),
Applies the passed function to the variant value.
Implementation
void when({
required void Function(StylingConstantFunctionPoints value)
onConstantFunctionPoints,
required void Function(StylingLinearZoomFunctionPoints value)
onLinearZoomFunctionPoints,
required void Function(StylingLinearTiltFunctionPoints value)
onLinearTiltFunctionPoints,
required void Function(StylingBilinearFunctionMatrix value)
onBilinearFunctionMatrix,
}) {
if (_value is StylingConstantFunctionPoints) {
return onConstantFunctionPoints(_value as StylingConstantFunctionPoints);
}
if (_value is StylingLinearZoomFunctionPoints) {
return onLinearZoomFunctionPoints(
_value as StylingLinearZoomFunctionPoints);
}
if (_value is StylingLinearTiltFunctionPoints) {
return onLinearTiltFunctionPoints(
_value as StylingLinearTiltFunctionPoints);
}
if (_value is StylingBilinearFunctionMatrix) {
return onBilinearFunctionMatrix(_value as StylingBilinearFunctionMatrix);
}
assert(false);
}