A Uri with empty queryParameters (= {}) will have a ? at the end even it doens't have any query parameters
Steps to Reproduce
- Execute
flutter run on the code sample (see "Code sample" section below)
- Notice that the uri finishes with a
? but has no query parameters.
Expected results:
I would expect the uri to be /path
Actual results:
The uri is /path?
Code sample
void main() {
final uri = Uri(path: '/path', queryParameters: {});
print(uri);
}
Logs