paramsToString static method Null safety

String paramsToString(
  1. Map<String, String>? params
)

Implementation

static String paramsToString(Map<String, String>? params) {
  if (params == null) return "";
  String output = "?";
  params.forEach((key, value) {
    output += "$key=$value&";
  });
  return output.substring(0, output.length - 1);
}