inline<T> static method
- required void render(
- RePaintBox box,
- T state,
- Canvas canvas
- T setUp(
- RePaintBox box
- T? update(
- RePaintBox box,
- T state,
- double delta
- void tearDown(
- T state
- int? frameRate = const RePaintFrameRate.zero(),
- Listenable? repaint,
- bool repaintBoundary = false,
- Key? key,
Create a new RePaint widget with an inline controller.
The T is the custom state type.
The frameRate is used to limit the frame rate, (limitter and throttler).
The repaint is used to repaint the scene when the listenable changes.
The setUp is called when the controller is attached to the render box.
The update is called periodically by the loop.
The render is called to render the scene after the update.
The tearDown is called to unmount and dispose the controller.
The repaintBoundary is used to create a new layer for the scene.
The key is used to identify the widget.
After the frameRate is set, the real frame rate will be lower.
Before the frame rate, updates are limited by the flutter ticker,
so the resulting frame rate will be noticeably lower.
By default the frame rate is set to 0 and scene is updated only
at repaint updates.
By default, the repaintBoundary is set to false for inline widgets.
A widget that repaints the scene using a custom controller.
Implementation
static Widget inline<T>({
required void Function(RePaintBox box, T state, Canvas canvas) render,
T Function(RePaintBox box)? setUp,
T? Function(RePaintBox box, T state, double delta)? update,
void Function(T state)? tearDown,
int? frameRate = const RePaintFrameRate.zero(),
Listenable? repaint,
bool repaintBoundary = false,
Key? key,
}) =>
RePaintInline<T>(
render: render,
setUp: setUp,
update: update,
tearDown: tearDown,
frameRate: frameRate,
repaint: repaint,
repaintBoundary: repaintBoundary,
key: key,
);