fontSizeTW function

double? fontSizeTW(
  1. List<String> params
)

Implementation

double? fontSizeTW(List<String> params) {
  Map<String, double> fontSizesTW = {
    'text-2xs': 10,
    'text-xs': 12,
    'text-sm': 14,
    'text-base': 16,
    'text-lg': 18,
    'text-xl': 20,
    'text-2xl': 24,
    'text-3xl': 30,
    'text-4xl': 36,
    'text-5xl': 48,
    'text-6xl': 60,
    'text-7xl': 72,
    'text-8xl': 96,
    'text-9xl': 128,
  };

  if (params.toSet().intersection(fontSizesTW.keys.toSet()).isEmpty) {
    return null;
  }

  return fontSizesTW[
      params.toSet().intersection(fontSizesTW.keys.toSet()).first];
}