parameterToString function

String parameterToString(
  1. dynamic value
)

Format the given parameter object into a String.

Implementation

String parameterToString(dynamic value) {
  if (value == null) {
    return '';
  }
  if (value is DateTime) {
    return value.toUtc().toIso8601String();
  }
  if (value is CountryEnum) {
    return CountryEnumTypeTransformer().encode(value).toString();
  }
  if (value is FilterEventsEnum) {
    return FilterEventsEnumTypeTransformer().encode(value).toString();
  }
  if (value is GlobalStatisticsGroupByEnum) {
    return GlobalStatisticsGroupByEnumTypeTransformer().encode(value).toString();
  }
  if (value is ModelStatus) {
    return ModelStatusTypeTransformer().encode(value).toString();
  }
  if (value is OrderState) {
    return OrderStateTypeTransformer().encode(value).toString();
  }
  if (value is PaymentMethodEnum) {
    return PaymentMethodEnumTypeTransformer().encode(value).toString();
  }
  if (value is PriceCurrencyEnum) {
    return PriceCurrencyEnumTypeTransformer().encode(value).toString();
  }
  if (value is ProjectStatisticsGroupByEnum) {
    return ProjectStatisticsGroupByEnumTypeTransformer().encode(value).toString();
  }
  if (value is RoleEnum) {
    return RoleEnumTypeTransformer().encode(value).toString();
  }
  if (value is TimeRangeEnum) {
    return TimeRangeEnumTypeTransformer().encode(value).toString();
  }
  return value.toString();
}