pathJoin method

String pathJoin(
  1. List<String> parts
)

Implementation

String pathJoin(List<String> parts) {
  var separator = '/';
  final replace = RegExp(r'$separator{1,}');
  return parts
      .join(separator)
      .replaceAll(replace, separator)
      .replaceAll('http:/', 'http://')
      .replaceAll('https:/', 'https://');
}