toBool method

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

Transform the value to a boolean using standard parsing.

Implementation

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