SimpleConverter<T>.fixed constructor

const SimpleConverter<T>.fixed(
  1. {required List<T> elements,
  2. required String stringify(
    1. T
    ),
  3. int sensitivity,
  4. T? reviver(
    1. StringView,
    2. ContextData
    )}
)

Create a new SimpleConverter which converts an unchanging number of elements.

This differs from a normal SimpleConverter in that it will use parameter choices instead of autocompletion if the number of elements is small enough. If the number of elements is not small enough to use choices, the normal SimpleConverter behavior is used instead.

Implementation

const factory SimpleConverter.fixed({
  required List<T> elements,
  required String Function(T) stringify,
  int sensitivity,
  T? Function(StringView, ContextData) reviver,
}) = _FixedSimpleConverter<T>;