Ion-tab-button dynamic icon

Hi, i’m realizing a new app with the tab menu.
I’m using custom icon with ion-icon to use the selected style of ionic css.
However, I would like that when I select a tab, in addition to changing the color, the icon changes from outline to fill. Could you tell me what is the best way to do it?
Schermata 2022-04-04 alle 11.37.41
Thanks in advance!