Rayon Saunders, 18, was found with 108 individual wraps of heroin and crack cocaine - worth roughly £1,800 - at an address on Marston Road, Stafford, on September 10.
Saunders, of Lakefield Road, Wolverhampton, was also found with £360 in cash and two mobile phones.
After trying to flee police he was detained, searched and arrested. One officer suffered cuts and bruises in the ensuing struggle.
Data taken from one of the mobile phones indicated Saunders was supplying drugs.
After also searching his home address, a total of £6,161 in cash was seized as criminal property.
Saunders pleaded guilty to possessing heroin and crack cocaine with intent to supply.
At Stafford Crown Court on Monday, he was sentenced to three years detention in a young offenders institute.
Saunders was found not guilty, after denying a charge, of acquiring and possessing criminal property as part of the case.
Sergeant Tom Fotherby, of the Stafford neighbourhood action team, said: "Officers witnessed a known drug user meeting with Saunders and acted accordingly to take another drug dealer off Stafford’s streets.
"We will continue to work to break through County Lines operations and bring offenders to justice, making the communities we serve safer places to live."