Normally, if a widget has to rebuild many times or requires a lot of GPU resources, it is expensive. So, how about videos?
For example, consider the two following scenarios:
Which alternate would probably be more expensive?
I know this is a broad question, but having a sense of what approaches are relatively costly would be very useful. I’m not very knowledgeable about the deep workings of Flutter, so I’m hoping someone could give me a better sense about the costs of videos.
Widget rebuild is very fast and not expensive. It is intended be to rebuilt very frequently. You can rebuild and animate hundreds of widget every frame without lagging.
Video player are implemented in native language, and the performance are very different on different devices
For simple animation, you should use widget, using video won't improve performance, but for very complex animation or 3D animation, using pre-rendered video could be useful