fillStyles method

  1. @override
void fillStyles(
  1. DocumentStyle stylesheet,
  2. InlineTextStyle parentTextStyle
)
override

Implementation

@override
void fillStyles(DocumentStyle stylesheet, InlineTextStyle parentTextStyle) {
  style = switch (level) {
    1 => stylesheet.header1,
    2 => stylesheet.header2,
    3 => stylesheet.header3,
    4 => stylesheet.header4,
    5 => stylesheet.header5,
    _ => stylesheet.header6,
  };
  final textStyle = FlameTextStyle.merge(parentTextStyle, style.text)!;
  super.fillStyles(stylesheet, textStyle);
}