toBool method

bool toBool([
  1. int value = 1
])

Returns true if the value is 1 otherwise false is returned.

Implementation

bool toBool([int value = 1]) => this == value ? true : false;