Do I need to post dependency codes which are in the actual code I need to be reviewed?
No, you do not need to include all the dependencies of your code when posting it for review. But doing so can be helpful.
We only require that the code should be working for you, there is no requirement that everybody should be able to copy-paste your code and get it running.
If you do not include all the code dependencies in your question, it is good if you either link to a Github repository that does include everything to make it fully runnable, or if you explain a bit what the omitted code does.