toQueryParameters static method

Map<String, String>? toQueryParameters(
  1. Map? parameters
)

Implementation

static Map<String, String>? toQueryParameters(Map? parameters) {
  if (parameters == null) return null;

  if (parameters is Map<String, String>) {
    return parameters;
  }

  var queryParameters = parameters
      .map((key, value) => MapEntry('$key', toQueryParameterValue(value)));
  return queryParameters;
}