Finishing get values from storage then startup the app

i created provider and inside it 2 methods one of them to store value using “storge” and the another to return this value
the problem i use this returned value to view some data in the pages …and this function that return data sometimes work after page load and sometimes work before and that not correct
what i need is force this the function to return data first and then render the page
how i can do it
with thanks