updateText method

bool updateText(
  1. String id,
  2. String text
)

Updates one text object's text.

Implementation

bool updateText(String id, String text) {
  final object = objectById(id);
  if (object is! CanvasTextObject || object.locked) return false;
  return update(id, object.copyWith(text: text));
}