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 OudsDisplayTextSize.large:
return typography.typeDisplayLarge(context);
case OudsDisplayTextSize.medium:
return typography.typeDisplayMedium(context);
case OudsDisplayTextSize.small:
return typography.typeDisplaySmall(context);
}
}