handleBool static method

bool handleBool(
  1. Map<String, dynamic> json,
  2. String key
)

Implementation

static bool handleBool(Map<String, dynamic> json, String key) {
  var backBool = false;
  if (json.containsKey(key)) {
    var tmp = json[key];
    if (tmp is bool) {
      backBool = json[key];
    } else {
      backBool = false;
    }
  } else {
    backBool = false;
  }

  return backBool;
}