Can you benefit from the Dueling fighting style for one weapon, then draw a second weapon as part of Extra Attack to qualify for Two-Weapon Fighting?

Say a Champion fighter has the "Two-Weapon Fighting" fighting style and the "Dual Wielder" feat. At 10th level, they pick up "Dueling" (+2 to damage rolls when wielding a single one-handed melee weapon) for their 2nd fighting style. Since they’re 10th-level, their Extra Attack feature lets them make 2 attacks as part of the Attack action.

Can they have one weapon drawn for their first attack, to benefit from Dueling – and only then draw another weapon for their second attack in the Attack action, in order to meet the requirement for Two-Weapon Fighting (and thus deliver another attack with their bonus action)?