Use the path Pub package, and use join() to create a new path from existing paths. Using join() ensures that the current platform's directory separator is used in the path.
import 'package:path/path.dart' as path; main() { var newPath = path.join('/Users/shailen', 'dart/projects'); print(newPath); // Prints '/Users.shailen/dart/projects'. }
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did129457