encodeInteractiveInkFeatureFactory static method

String? encodeInteractiveInkFeatureFactory(
  1. InteractiveInkFeatureFactory? value
)

Encodes the given value to the String representation. Supported values are:

  • splash
  • ripple

All other values, including null, will result in null.

Implementation

static String? encodeInteractiveInkFeatureFactory(
  InteractiveInkFeatureFactory? value,
) {
  var splashType = InkSplash.splashFactory.runtimeType;
  var rippleType = InkRipple.splashFactory.runtimeType;

  assert(value == null ||
      value.runtimeType == splashType ||
      value.runtimeType == rippleType);
  String? result;

  if (value != null) {
    if (value.runtimeType == splashType) {
      result = 'splash';
    } else if (value.runtimeType == rippleType) {
      result = 'ripple';
    }
  }

  return result;
}