render method Null safety
- Scene scene
Updates the view's rendering on the GPU with the newly provided Scene.
This function must be called within the scope of the PlatformDispatcher.onBeginFrame or PlatformDispatcher.onDrawFrame callbacks being invoked.
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.
- SchedulerBinding, the Flutter framework class which manages the scheduling of frames.
- RendererBinding, the Flutter framework class which manages layout and painting.
void render(Scene scene) => _render(scene);