Rendering takes a lot of computational power in many cases. Thus, it can happen that frames are being skipped as the UI needs to wait for the rendering to finish.
I was wondering how I could implement rendering or painting asynchronously, i.e. isolated.
Functions like compute
are not an option because SendPort
only works with primitive types and painting will require a PaintingContext
or Canvas
.
There are Flutter plugins that require heavy rendering. Hence, I thought that I could find answers in the video_player
plugin, but it uses Texture
, i.e. does not render in Dart.
I am wondering if there are any idioms or example implementations regarding this.
I you are wondering how I implement rendering, you can take a look at FlareActor
. It turns out that they handle painting exactly like I do. Now I am wondering why I am running into bottlenecks and Flare is not. Are there any guides on optimizing painting?