update method
bool
update(
- CanvasChildId id, {
- Offset? position,
- double? rotation,
- Size? childSize,
- Widget? widget,
Apply supplied fields atomically. Null fields leave existing values unchanged.
Returns whether anything changed; changed updates notify exactly once.
rotation is clockwise radians around the layout center.
Implementation
bool update(
CanvasChildId id, {
Offset? position,
double? rotation,
Size? childSize,
Widget? widget,
}) {
final child = _requireChild(id);
_validateGeometry(
position: position,
rotation: rotation,
childSize: childSize,
);
final changed = _updateChild(
child,
id,
position: position,
rotation: rotation,
childSize: childSize,
widget: widget,
);
if (changed) markDirty();
return changed;
}