toBoolean static method
Implementation
static bool toBoolean(v) {
if (v is bool) {
return v;
} else if (v is String) {
return v == 'true';
} else if (v == null) {
return v == false;
}
return false;
}
static bool toBoolean(v) {
if (v is bool) {
return v;
} else if (v is String) {
return v == 'true';
} else if (v == null) {
return v == false;
}
return false;
}