MarkdownTextScaling class abstract final

Shared text-scaling contract for Markdown widgets and custom renderers.

Standalone blocks inherit the document's MediaQuery text scaler. A widget inside a paragraph must not scale itself too: Flutter scales its entire WidgetSpan box. Build ordinary Text widgets with unscaled font sizes. Renderers that paint their own glyphs must use fontSize at build time.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fontSize(BuildContext context, double unscaledSize) double
Resolve a glyph size for a renderer that does not use Text/RichText. Do not apply this to Text's style: Text already uses the ambient scaler.
wrap(Widget child, {required bool enabled}) Widget
Enable inherited scaling for standalone content, or suppress it when an enclosing paragraph owns scaling. The enabled path adds no widget.