isBitSet static method

bool isBitSet({
  1. int? bit,
  2. int? value,
})

Implementation

static bool isBitSet({int? bit, int? value})
{
  if (bit   == null) return false;
  if (value == null) return false;

  int _value = pow(2,bit - 1) as int;
  return ((value & _value) == _value);
}