textStyle method
- BuildContext context
Returns the TextStyle associated with size in the active theme.
Implementation
@protected
TextStyle textStyle(BuildContext context) {
final typography = OudsTheme.of(context).typographyTokens;
switch (size) {
case OudsHeadingTextSize.xLarge:
return typography.typeHeadingXLarge(context);
case OudsHeadingTextSize.large:
return typography.typeHeadingLarge(context);
case OudsHeadingTextSize.medium:
return typography.typeHeadingMedium(context);
case OudsHeadingTextSize.small:
return typography.typeHeadingSmall(context);
}
}