For some reason while attempting to import the com.esri.ags.portal.*, despite having the library imported in flex builder, it keeps on giving the error "import cannot be found." The strange thing is every other required import from the sample widget is not giving the same error. I tried multiple flex versions and refreshed and rebuilt, but it still has that issue.
I'm not sure what version of Esri's Flex API (a.k.a ArcGIS API for Flex) you are using, but it sounds like it could be because of a package name change.
In version 3.0 and above of the ArcGIS API for Flex, the package name is com.esri.ags.portal http://resources.arcgis.com/en/help/flex-api/apiref/
In version 2.x, the package name was com.esri.ags.webmap http://help.arcgis.com/en/webapi/flex/apiref/
Version 3.0 and above requires Adobe/Apache Flex SDK 4.5 or later, while version 2.x only required 4.0.