getParentDir method
get reduce url path by one directory.
Exampe:
if path = "/flutter/app/dir/test"
getParentDir(path) returns "/flutter/app/dir"
Implementation
String getParentDir(String path) =>
(path.split(pathJoin)..removeLast()).join(pathJoin);