toJson method

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

Implementation

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

  throw 'Json_Unsuported_Value';
}