FlameChangeNotifierProvider<T extends ChangeNotifier> class
Methods
-
build(BuildContext context)
→ FlameWidget
-
Return widgets here that should be drawn as child(ren) of this widget
You should also update the child(ren) and call the render of the child(ren)
override
-
buildChild(BuildContext context)
→ FlameWidget
-
-
determinePrefferedSize(Vector2 parentBounds)
→ Vector2
-
Determine how large this widget wants to be, based on constraints
like child, width, height, fontSize, ...
use parentBounds for unpreffered sizes
inherited
-
dispose()
→ void
-
Overwrite to dispose when this object is removed from the tree
override
-
markForRebuild()
→ void
-
Marks for rebuild, similar to setState in Flutter
inherited
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
onDragEnd(Vector2 position)
→ void
-
inherited
-
onDragStart(Vector2 position)
→ void
-
inherited
-
onDragUpdate(Vector2 position)
→ void
-
inherited
-
onScaleEnd(Vector2 position, double scale)
→ void
-
inherited
-
onScaleStart(Vector2 position)
→ void
-
inherited
-
onScaleUpdate(Vector2 position, double scale)
→ void
-
inherited
-
onTapDown(Vector2 tapPosition)
→ void
-
inherited
-
onTapUp(Vector2 tapPosition)
→ void
-
inherited
-
reBuildChild(BuildContext context, Vector2 bounds)
→ void
-
Used to build this child, override to disable if you don't require (re)build
inherited
-
render(Canvas canvas, BuildContext context)
→ void
-
You must call super if you override this and override build
Don't call super if you use this widget as a renderingWidget
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
-
update(double delta)
→ void
-
Only used in
FlameRenderWidgets
for now, FlameWidgets are not
being updated correctly. If you want to update your state, use
a FlameCanvas with onUpdate
Don't call super if you use this widget as a renderingWidget
inherited
-
updateChild()
→ void
-
-
updateData(Vector2 newBounds, BuildContext context, FlameWidget? parent)
→ void
-
Update the bounds of this widget
Must call super first when overriding this
Note that your child(ren) should be updated during build
inherited