toJson method

  1. @override
String? toJson(
  1. InteractiveInkFeatureFactory? value
)
override

Implementation

@override
String? toJson(InteractiveInkFeatureFactory? value) {
  if (value == null) return null;
  final splashType = InkSplash.splashFactory.runtimeType;
  final rippleType = InkRipple.splashFactory.runtimeType;
  if (value.runtimeType == splashType) {
    return 'splash';
  } else if (value.runtimeType == rippleType) {
    return 'ripple';
  }

  throw 'Json_Unsuported_Value';
}