toIntStrict method

IntBuilder toIntStrict({
  1. String? message,
})

Transform the value to an integer using strict parsing (no fallback to 0).

Implementation

IntBuilder toIntStrict({String? message}) {
  if (chain.coercedToInt) return IntBuilder(chain: chain);
  chain.setTransform(CoercionKind.int_, (child) => tr.toIntStrict(child));
  return IntBuilder(chain: chain);
}