InteractionInput.fromObject constructor

InteractionInput.fromObject(
  1. Map<String, Object?> value
)

Creates an InteractionInput from a Map of values.

Throws a FormatException if any entry of the value map is not a valid DataSchemaValue.

Implementation

factory InteractionInput.fromObject(Map<String, Object?> value) {
  final dataSchemaValue = ObjectValue.tryParse(value);

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

  return DataSchemaValueInput(dataSchemaValue);
}