createQueryString function
Implementation
String createQueryString(Map<String, dynamic> queryParams) {
List<String> keys = queryParams.keys.toList()..sort(); // Get sorted keys
List<String> queryList = keys.map((key) {
String encodedValue = Uri.encodeComponent(queryParams[key]!);
return '$key=$encodedValue';
}).toList();
String queryString = queryList.join('&');
return queryString;
}