getBooleanFromMapValue static method

bool getBooleanFromMapValue(
  1. dynamic value
)

Utility function to interpret various representations of boolean values.

Returns true if the value is 1, "True", "true", or true, otherwise returns false.

Implementation

static bool getBooleanFromMapValue(dynamic value) {
  return value == 1 || value == "True" || value == "true" || value == true;
}