font property

Font? font

Implementation

Font? get font => _font;
void font=(Font? font)

Implementation

set font(Font? font) {
  if (_font == font) {
    return;
  }
  _font = font;

  var callbacks = _callbacks.toList(growable: false);
  _callbacks.clear();
  for (final callback in callbacks) {
    callback();
  }

  // the referencer could register a callback as well rather
  // actual referencers. might be cleaner for this specific scenario
  // but i'm not sure if there are other use-cases for the back-ref
  // that will require a different paradigm
  for (final referencer in fileAssetReferencers) {
    final target = referencer.target;
    if (target is TextStyle) {
      target.addDirt(ComponentDirt.textShape);
    }
  }
}