textStyle method

  1. @protected
TextStyle textStyle(
  1. 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);
  }
}