intToBool function Null safety

bool intToBool(
  1. int a
)

Convert a int to bool, if 0 return false, else true

Implementation

bool intToBool(int a) => a == 0 ? false : true;