list static method
Implementation
static Map<String, Object> list(List<Map<String, Object>> values, String name,
{List<Map<String, Object>> defaultValue = const [],
bool useDefaultValue = false,
bool allowNull = false}) {
if (useDefaultValue && allowNull) {
throw LooseException(
'Cannot allow null and use default value for "$name". Must only use one or neither.');
}
if (values != null) {
return {
'arrayValue': {'values': values}
};
} else if (allowNull) {
return _toNullValue;
} else if (useDefaultValue) {
return {
'arrayValue': {'values': defaultValue}
};
} else {
throw LooseException('Null provided but not allowed in "$name".');
}
}