from static method

int from(
  1. bool value
)

Returns 1 if the given value is true. Otherwise returns 0.

Implementation

static int from(bool value) => value ? 1 : 0;