Properties
bounds
↔ Vector2
The bounds of this widget, you cannot draw outside of these
This variable is initially set to 1, 1 only after being added
to the UI this might change, so don't use it only in the
constructor, but incorporate it in the render/update functions
getter/setter pair
childBuild
↔ FlameWidget ?
getter/setter pair
context
↔ BuildContext ?
getter/setter pair
disposed
→ bool
no setter
hashCode
→ int
The hash code for this object.
no setter inherited
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
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)
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
dispose ()
→ void
Overwrite to dispose when this object is removed from the tree
markForRebuild ()
→ void
Marks for rebuild, similar to setState in Flutter
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onDragEnd (Vector2 position )
→ void
onDragStart (Vector2 position )
→ void
onDragUpdate (Vector2 position )
→ void
onScaleEnd (Vector2 position , double scale )
→ void
onScaleStart (Vector2 position )
→ void
onScaleUpdate (Vector2 position , double scale )
→ void
onTapDown (Vector2 tapPosition )
→ void
onTapUp (Vector2 tapPosition )
→ void
reBuildChild (BuildContext context , Vector2 bounds )
→ void
Used to build this child, override to disable if you don't require (re)build
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
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
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
flutter_flame_architecture 0.0.1