getParams method
Implementation
String getParams(Map<String, String>? params) {
if (params == null) return '';
StringBuffer paramStr = StringBuffer('?');
params.forEach((key, value) {
if (paramStr.length > 1) paramStr.write('&');
paramStr.write('$key=$value');
});
return paramStr.toString();
}