truthful static method

bool truthful(
  1. dynamic value
)

Implementation

static bool truthful(value) {
  if (value == null) {
    return false;
  }
  if (value == true ||
      value == 'true' ||
      value == 1 ||
      value == '1' ||
      value.toString().toLowerCase() == 'yes') {
    return true;
  }
  return false;
}