FlutterPainter.builder constructor
const
FlutterPainter.builder({
- Key? key,
- required PainterController controller,
- required FlutterPainterBuilderCallback builder,
- DrawableCreatedCallback? onDrawableCreated,
- DrawableDeletedCallback? onDrawableDeleted,
- ValueChanged<
ObjectDrawable?> ? onSelectedObjectDrawableChanged, - ValueChanged<
PainterSettings> ? onPainterSettingsChanged,
Creates a FlutterPainter with the given controller
, builder
and optional callbacks.
Using this constructor, the builder
will be called any time the controller
updates.
It is useful if you want to build UI that automatically rebuilds on updates from controller
.
Implementation
const FlutterPainter.builder(
{Key? key,
required this.controller,
required FlutterPainterBuilderCallback builder,
this.onDrawableCreated,
this.onDrawableDeleted,
this.onSelectedObjectDrawableChanged,
this.onPainterSettingsChanged})
: _builder = builder,
super(key: key);