tryDecodeComponent static method
Decodes component
using Uri.decodeComponent,
but returns null if the decoding fails due to non-ASCII characters.
Implementation
static String? tryDecodeComponent(String component) {
try {
return Uri.decodeComponent(component);
} on ArgumentError {
return null;
}
}