restorePathParameter function

String restorePathParameter(
  1. String path
)

Implementation

String restorePathParameter(String path) {
  return path.replaceAllMapped(
    RegExp(r':([\d\w_]+)'),
    (m) => '[${m[1]}]',
  );
}