"We've always thought positively and we could feel it looking at training sessions. At Barca you have to win titles and three titles is just great," Flick told Movistar Plus.
"It's always important to be mentally strong. That is what we looked for throughout the year. Winning the Super Cup in January gave us confidence. It was great to see how the players have reached their highest level and others have improved."
Barcelona, who also reached the Champions League semi-finals where they lost to Inter Milan in a dramatic encounter, were deserved champions with 169 goals in all competitions.
They were seconds away from triumphing the previous day until Real Madrid scored an injury-time winner against Mallorca.
The Catalans needed to beat Espanyol to be sure of the title - but had to ride their luck a bit with Urko Gonzalez and Javi Puado missing chances for the hosts.
But Yamal was the hero, not for the first time, with a trademark finish from Dani Olmo's . He then provided the assist for Lopez's deflected finish just before the end.
In a quirk, Barca have been confirmed as champions at Espanyol's ground more times than at home in the 21st Century.
They also won it at Espanyol themselves in 2023, while a Real Madrid draw at the RCDE Stadium in 2013 ended the title race that year in Barcelona's favour. They have only won two league titles at the Nou Camp since the 1990s.
There was a slight melee between the players at the final whistle as Barca started to celebrate, with ground staff turning the sprinklers on to get the visiting team off the pitch.
When they won at the same ground two years ago, the Barca players had to race to the dressing room as Espanyol fans ran on to the pitch at the end.
Barcelona will have an open-top bus parade in the city on Friday and receive the trophy at Sunday's home game against Villarreal (18:00 BST).