beforeDecode method

  1. @override
Object? beforeDecode(
  1. Object? value
)
override

Receives the ecoded value before decoding.

Implementation

@override
Object? beforeDecode(Object? value) {
  if (value is Iterable) {
    return VectorDefinition(value.first as int, value.last as int);
  }
  if (value is! String) {
    return value;
  }
  return VectorDefinition.fromDisplay(value);
}