Easiest way to make a skeleton screen when data is loading

Posted by Andre Scott | Updated on

Easiest way to make a skeleton screen when data is loading. You can combine a Stack and Positioned.fill with a FractionallySizedBox to position such gradient on the top of another widget.

Then you can combine it to an AnimationController, an AnimatedBuilder and an Align or FractionallySizedBox to animate the position of the gradient over time.

Here is a quick example:

Which you can then use by wrapping any given widget :


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers