TextKitConfig class

Global configuration for TextKit widgets.

Supported Fonts

The configuration supports any Google Font family name. Common examples:

  • poppins (default)
  • fredoka
  • roboto
  • montserrat
  • opensans
  • lato
  • nunito
  • raleway
  • inter

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 Properties

fontFamily String
Gets the current font family.
no setter

Static Methods

getTextStyle({double? fontSize, Color? color, FontWeight? fontWeight, double? height, double? letterSpacing}) TextStyle
Creates a TextStyle with the configured font family.
setFont(String fontFamily) → void
The fontFamily parameter should match a Google Fonts family name. Font names are automatically sanitized (lowercased, special chars removed).