createPath static method
Create a String path of the segments provided if any.
Implementation
static String createPath(String path, [Iterable<dynamic>? segments]) {
if (segments == null || segments.isEmpty) {
return path;
}
final list = segments.map((e) => '/$e');
return path + list.join();
}