tryDecodePathMap function

Map<String, String>? tryDecodePathMap({
  1. required String path,
  2. required String template,
})

Decode the path map values from the given path, based on the provided template, but returns null if the path map values cannot be decoded.

Implementation

Map<String, String>? tryDecodePathMap({
  required String path,
  required String template,
}) {
  try {
    return decodePathMap(path: path, template: template);
  } catch (e) {
    return null;
  }
}