fontStyle property

  1. @override
FontStyle get fontStyle
override

Implementation

@override
FontStyle get fontStyle {
  if (_fontStyle != null) return _fontStyle!;

  _ensureLayoutPassInheritedTextCache();
  if (_layoutPassInheritedFontStyle != null) {
    return _layoutPassInheritedFontStyle!;
  }

  final FontStyle resolved = parent?.fontStyle ?? FontStyle.normal;
  if (_canUseLayoutPassInheritedTextCache) {
    _layoutPassInheritedFontStyle = resolved;
  }
  return resolved;
}
set fontStyle (FontStyle? value)

Implementation

set fontStyle(FontStyle? value) {
  if (_fontStyle == value) return;
  _fontStyle = value;
  // Update all the children text with specified style property not set due to style inheritance.
  _markChildrenTextNeedsLayout(this, FONT_STYLE);
}