textStyle method

TextStyleSpec? textStyle(
  1. String name
)

A text theme entry as widgets see it. M3 typography colors every style onSurface unless the app's text theme says otherwise.

Implementation

TextStyleSpec? textStyle(String name) {
  final entry = textTheme[name];
  if (entry == null) return null;
  return TextStyleSpec(
    fontFamily: fontFamily,
    color: color('onSurface'),
    token: textToken(name),
  ).merge(entry);
}