CompositionParamValue.fromJson constructor

CompositionParamValue.fromJson(
  1. dynamic json
)

Implementation

factory CompositionParamValue.fromJson(dynamic json) {
  if (json is String) return CompositionParamValue.string(value: json);
  if (json is num) return CompositionParamValue.number(value: json.toDouble());
  if (json is bool) return CompositionParamValue.boolean(value: json);
  throw ArgumentError('Illegal CompositionParamValue type: ${json.runtimeType}');
}