addChild method
CanvasChildId
addChild(
- Offset position,
- Widget widget, {
- Size? childSize,
- double rotation = 0,
- CanvasChildId? id,
Add a child at a given position with a widget. Returns the child ID.
You need the child size for optimising the focus on child
rotation is clockwise radians around the layout center.
Implementation
CanvasChildId addChild(
Offset position,
Widget widget, {
Size? childSize,
double rotation = 0,
CanvasChildId? id,
}) {
final childId = _addChildInternal(
position,
widget,
childSize: childSize,
rotation: rotation,
id: id,
);
markDirty();
return childId;
}