ReplitTypography class

Text style tokens for replit_ui components.

Follows the Material 3 type scale (display / headline / title / body / label, each in large / medium / small), so a host can map an existing M3 text theme across. Styles are colorless — components combine them with ReplitColors tokens (e.g. typography.bodyLarge.copyWith(color: colors.onSurface)).

Annotations

Constructors

ReplitTypography({required TextStyle displayLarge, required TextStyle displayMedium, required TextStyle displaySmall, required TextStyle headlineLarge, required TextStyle headlineMedium, required TextStyle headlineSmall, required TextStyle titleLarge, required TextStyle titleLargeEmphasised, required TextStyle titleMedium, required TextStyle titleMediumEmphasised, required TextStyle titleSmall, required TextStyle titleSmallEmphasised, required TextStyle bodyLarge, required TextStyle bodyLargeEmphasised, required TextStyle bodyLargeDark, required TextStyle bodyMedium, required TextStyle bodyMediumEmphasised, required TextStyle bodyMediumDark, required TextStyle bodySmall, required TextStyle bodySmallEmphasised, required TextStyle bodySmallDark, required TextStyle labelLarge, required TextStyle labelLargeEmphasised, required TextStyle labelMedium, required TextStyle labelMediumEmphasised, required TextStyle labelSmall, required TextStyle labelSmallEmphasised, TextStyle code = _standardCode, TextStyle codeInline = _standardCodeInline})
const

Properties

bodyLarge → TextStyle
Prose and composer input. Each size carries three weights: regular (w400), emphasised (w500) and dark (w700).
final
bodyLargeDark → TextStyle
final
bodyLargeEmphasised → TextStyle
final
bodyMedium → TextStyle
final
bodyMediumDark → TextStyle
final
bodyMediumEmphasised → TextStyle
final
bodySmall → TextStyle
final
bodySmallDark → TextStyle
final
bodySmallEmphasised → TextStyle
final
code → TextStyle
The code block's body, in the host's monospace face: 13 on a taller line (1.6), so a block reads as inset material, not a continuing paragraph.
final
codeInline → TextStyle
The mono face a step under prose size, for inline code spans.
final
displayLarge → TextStyle
final
displayMedium → TextStyle
final
displaySmall → TextStyle
final
hashCode → int
The hash code for this object.
no setterinherited
headlineLarge → TextStyle
final
headlineMedium → TextStyle
final
headlineSmall → TextStyle
final
labelLarge → TextStyle
Controls — each size pairs the regular cut (w400) with an emphasised one (w500), like the body roles.
final
labelLargeEmphasised → TextStyle
final
labelMedium → TextStyle
final
labelMediumEmphasised → TextStyle
final
labelSmall → TextStyle
final
labelSmallEmphasised → TextStyle
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
titleLarge → TextStyle
Headings — single-line at 1.0. Each size pairs the regular cut (w400) with an emphasised one (w700).
final
titleLargeEmphasised → TextStyle
final
titleMedium → TextStyle
final
titleMediumEmphasised → TextStyle
final
titleSmall → TextStyle
final
titleSmallEmphasised → TextStyle
final

Methods

copyWith({TextStyle? displayLarge, TextStyle? displayMedium, TextStyle? displaySmall, TextStyle? headlineLarge, TextStyle? headlineMedium, TextStyle? headlineSmall, TextStyle? titleLarge, TextStyle? titleLargeEmphasised, TextStyle? titleMedium, TextStyle? titleMediumEmphasised, TextStyle? titleSmall, TextStyle? titleSmallEmphasised, TextStyle? bodyLarge, TextStyle? bodyLargeEmphasised, TextStyle? bodyLargeDark, TextStyle? bodyMedium, TextStyle? bodyMediumEmphasised, TextStyle? bodyMediumDark, TextStyle? bodySmall, TextStyle? bodySmallEmphasised, TextStyle? bodySmallDark, TextStyle? labelLarge, TextStyle? labelLargeEmphasised, TextStyle? labelMedium, TextStyle? labelMediumEmphasised, TextStyle? labelSmall, TextStyle? labelSmallEmphasised, TextStyle? code, TextStyle? codeInline}) → ReplitTypography
lerp(ReplitTypography? other, double t) → ReplitTypography
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
withCodeFontFamily(String fontFamily, {String? package}) → ReplitTypography
The same scale with only code and codeInline set in fontFamily — for hosts swapping the mono face while keeping the prose one.
withFontFamily(String fontFamily, {String? package}) → ReplitTypography
The same scale set in fontFamily instead of the host's default face. The mono roles keep their own face — swap those with withCodeFontFamily.

Operators

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

Static Methods

recut(TextStyle style, {FontWeight? fontWeight, FontStyle? fontStyle}) → TextStyle
style at fontWeight and/or fontStyle.

Constants

standard → const ReplitTypography
The type scale, inheriting the host's text face and monospace fallback.