toBoolLenient method

BoolBuilder toBoolLenient({
  1. String? message,
})

Transform the value to a boolean using lenient parsing.

Implementation

BoolBuilder toBoolLenient({String? message}) {
  if (chain.coercedToBool) return BoolBuilder(chain: chain);
  chain.setTransform(CoercionKind.bool_, (child) => tr.toBoolLenient(child));
  return BoolBuilder(chain: chain);
}