put method

  1. @override
FlyFontToken put(
  1. String key,
  2. List<String> value
)
override

Put a new value for the given key

Implementation

@override
FlyFontToken put(String key, List<String> value) {
  switch (key) {
    case 'sans':
      return copyWith(sans: value);
    case 'serif':
      return copyWith(serif: value);
    case 'mono':
      return copyWith(mono: value);
    default:
      final newExtras = Map<String, List<String>>.from(extras);
      newExtras[key] = value;
      return copyWith(extras: newExtras);
  }
}