render method Null safety
- Scene scene
Updates the view's rendering on the GPU with the newly provided Scene.
If this function is called a second time during a single PlatformDispatcher.onBeginFrame/PlatformDispatcher.onDrawFrame callback sequence or called outside the scope of those callbacks, the call will be ignored.
To record graphical operations, first create a PictureRecorder, then construct a Canvas, passing that PictureRecorder to its constructor. After issuing all the graphical operations, call the PictureRecorder.endRecording function on the PictureRecorder to obtain the final Picture that represents the issued graphical operations.
Next, create a SceneBuilder, and add the Picture to it using SceneBuilder.addPicture. With the SceneBuilder.build method you can then obtain a Scene object, which you can display to the user via this render function.
void render(Scene scene) => _render(scene, this);