Ran into this while analyzing the generated widget preview scaffold project, which failed because the pubspec contained a path with Windows path separators.
To reproduce on Windows, run:
// Note the use of POSIX path separators
dart pub add 'my_package:{"path":"C:/src/my_package"}'
The resulting entry in pubspec.yaml uses Windows path separators:
my_package:
path: C:\src\my_package
Ran into this while analyzing the generated widget preview scaffold project, which failed because the pubspec contained a path with Windows path separators.
To reproduce on Windows, run:
The resulting entry in
pubspec.yamluses Windows path separators: