I have been developing an application in web app builder. I am stuck at a point where I want to create a widget which would provide the demonstration of my complete application. I don't get it how to go about it. Please guide me.
GitHub is a great place to start for creating a custom widget. There are instructions and code samples for various widgets to get you started.
Assuming you are using the Web AppBuilder developer addition, and not the AGOL version (where you can not add a custom widget), Check out the many resources and links on my blog Web AppBuilder Developer Edition - Customization Resource List