getCachedValue method

  1. @override
MustMatchCacheEntry getCachedValue(
  1. DogStructure structure,
  2. DogStructureField field
)
override

Returns a cached value for this validator. Will be passed to validate

Implementation

@override
MustMatchCacheEntry getCachedValue(DogStructure structure, DogStructureField field) {
  final selfIndex = structure.fields.indexOf(field);
  final otherIndex = structure.indexOfFieldName(otherFieldName)!;
  final proxy = structure.proxy;
  return MustMatchCacheEntry(
      field.name, structure.fields[otherIndex].name, selfIndex, otherIndex, proxy);
}