fontWeight property

  1. @override
FontWeight get fontWeight
override

Implementation

@override
FontWeight get fontWeight {
  // Get style from self or closest parent if specified style property is not set
  // due to style inheritance.
  if (_fontWeight == null && parent != null) {
    return parent!.fontWeight;
  }

  // The root element has no fontWeight, and the fontWeight is initial.
  return _fontWeight ?? FontWeight.w400;
}
set fontWeight (FontWeight? value)

Implementation

set fontWeight(FontWeight? value) {
  if (_fontWeight == value) return;
  _fontWeight = value;
  // Update all the children text with specified style property not set due to style inheritance.
  _markChildrenTextNeedsLayout(renderBoxModel!, FONT_WEIGHT);
}