put method

  1. @override
FlyLeadingToken put(
  1. String key,
  2. double value
)
override

Put a new value for the given key

Implementation

@override
FlyLeadingToken put(String key, double value) {
  switch (key) {
    case 'tight':
      return copyWith(tight: value);
    case 'snug':
      return copyWith(snug: value);
    case 'normal':
      return copyWith(normal: value);
    case 'relaxed':
      return copyWith(relaxed: value);
    case 'loose':
      return copyWith(loose: value);
    default:
      final newExtras = Map<String, double>.from(extras);
      newExtras[key] = value;
      return copyWith(extras: newExtras);
  }
}