put method

  1. @override
FlyFontWeightToken put(
  1. String key,
  2. FontWeight value
)
override

Put a new value for the given key

Implementation

@override
FlyFontWeightToken put(String key, FontWeight value) {
  switch (key) {
    case 'thin':
      return copyWith(thin: value);
    case 'extralight':
      return copyWith(extralight: value);
    case 'light':
      return copyWith(light: value);
    case 'normal':
      return copyWith(normal: value);
    case 'medium':
      return copyWith(medium: value);
    case 'semibold':
      return copyWith(semibold: value);
    case 'bold':
      return copyWith(bold: value);
    case 'extrabold':
      return copyWith(extrabold: value);
    case 'black':
      return copyWith(black: value);
    default:
      final newExtras = Map<String, FontWeight>.from(extras);
      newExtras[key] = value;
      return copyWith(extras: newExtras);
  }
}