put method

  1. @override
FlyTextStyleToken put(
  1. String key,
  2. TextStyle value
)
override

Put a new value for the given key

Implementation

@override
FlyTextStyleToken put(String key, TextStyle value) {
  switch (key) {
    case 'xs':
      return copyWith(xs: value);
    case 'sm':
      return copyWith(sm: value);
    case 'base':
      return copyWith(base: value);
    case 'lg':
      return copyWith(lg: value);
    case 'xl':
      return copyWith(xl: value);
    case 'xl2':
      return copyWith(xl2: value);
    case 'xl3':
      return copyWith(xl3: value);
    case 'xl4':
      return copyWith(xl4: value);
    case 'xl5':
      return copyWith(xl5: value);
    case 'xl6':
      return copyWith(xl6: value);
    case 'xl7':
      return copyWith(xl7: value);
    case 'xl8':
      return copyWith(xl8: value);
    case 'xl9':
      return copyWith(xl9: value);
    default:
      final newExtras = Map<String, TextStyle>.from(extras);
      newExtras[key] = value;
      return copyWith(extras: newExtras);
  }
}