toBit static method Null safety

int toBit(
  1. bool b
)

Takes bool and returns 1 if true 0 if false

Implementation

static int toBit(bool b) => b ? 1 : 0;