InteractionInput.fromArray constructor

InteractionInput.fromArray(
  1. List<Object?> value
)

Creates an InteractionInput from a List of values.

Throws a FormatException if any element of the value list is not a valid DataSchemaValue.

Implementation

factory InteractionInput.fromArray(List<Object?> value) {
  final dataSchemaValue = ArrayValue.tryParse(value);

  if (dataSchemaValue == null) {
    throw const FormatException("Input contained invalid array element.");
  }

  return DataSchemaValueInput(dataSchemaValue);
}