parseBool static method

bool parseBool(
  1. dynamic json
)

Implementation

static bool parseBool(dynamic json) {
  if (json is String) {
    return json == '1';
  } else if (json is int) {
    return json == 1;
  } else if (json is bool) {
    return json;
  } else {
    return false;
  }
}