Check out example codes for "Invalid argument(s): join(null, "bin", "cache", "dart-sdk"): part 0 was null, but part 1 was not.". It will help you in understanding the concepts better.

Code Example 1

#on mac
1) run:
$ pub global activate dartdoc

2) cd to root of project then run:
flutter pub global run dartdoc:dartdoc

Learn ReactJs, React Native from