resolveFontWeight method

FontWeight resolveFontWeight(
  1. String? value
)

Implementation

FontWeight resolveFontWeight(String? value) {
  final int weight = resolve("fontWeights", value ?? "default") as int;

  const map = {
    100: FontWeight.w100,
    200: FontWeight.w200,
    300: FontWeight.w300,
    400: FontWeight.w400,
    500: FontWeight.w500,
    600: FontWeight.w600,
    700: FontWeight.w700,
    800: FontWeight.w800,
    900: FontWeight.w900,
  };

  return map[weight] ?? FontWeight.normal;
}