We need to make a lot of modifications to the widget to suit our needs, and I was wondering if instead of starting from scratch we get the code for the widget and modify it.
Starting from scratch isn't that bad. The thing with the esri widget, it has to take into effect every possible use and and isn't very customizable. With your own widget you have control over the look, feel and functionality. My widget is only a couple hundred lines long + a simple template. In the time spent trying to make the esri widget do what you want you could have your own. It's super easy if you use web mercator or lat/lng as you can use esri/geometry/geodesicUtils to compute accurate results in any unit w/o using a geom service.
Starting from scratch isn't that bad. The thing with the esri widget, it has to take into effect every possible use and and isn't very customizable. With your own widget you have control over the look, feel and functionality. My widget is only a couple hundred lines long + a simple template. In the time spent trying to make the esri widget do what you want you could have your own. It's super easy if you use web mercator or lat/lng as you can use esri/geometry/geodesicUtils to compute accurate results in any unit w/o using a geom service.