Api data failed to load properly and causes app crash in flutter
i am building a flutter android application and have integrated the resepective api for it, i got a huge problem where when the homescreen of the application opens then it display the category items which are image and title.
and when this homescreen opens then it loads for 2 – 3 seconds to load some of the data and during this loading process the app is very laggy and frame of the phone significantly drops, and after this all of the category data loads , when the data loading finishes then the lagging also stops.
Now, after this completes when i revisit this screen after navigating to some other page of the application then the same process repeats but the loading time will reduce from 2- 3 seconds to 1 -2 seconds and the image loading pattern is also same, first couple of the image and then rest of the others.
Remember that this issue happens even after i used cached network image only and even after it no success and then have also used custom cache manager, and this issue is not only for api data but also the image from the internet that i have used
please look into this matter and help me solve this issue and provide best solution and your suggestions