You should go to the root project :
in Terminal type :
cd [project paht]
For get full path you can copy path from folder in your finder ( in mac , go to the project and right cleck in your folder and push option button) and copy full path
cd /Users/..name../Desktop/FlutterExamples/name_of_project
and then in terminal type : flutter gen-l10n