I'm unaware on how to make "~" expand using path. I would expect that using path functions, directory/file class would automatically handle it.
import "dart:io";
import 'package:path/path.dart';
void main() {
print(absolute("~"));
var d = new Directory("~");
print(d.absolute.path);
}
Prints
/private/tmp/dummy/dummy/bin/~
/private/tmp/dummy/dummy/bin/~