getAsBooleanWithDefault method

bool getAsBooleanWithDefault(
  1. int index,
  2. bool defaultValue
)

Converts array element into a boolean or returns default value if conversion is not possible.

  • index an index of element to get.
  • defaultValue the default value Returns boolean value ot the element or default value if conversion is not supported.

See BooleanConverter.toBooleanWithDefault

Implementation

bool getAsBooleanWithDefault(int index, bool defaultValue) {
  var value = _values[index];
  return BooleanConverter.toBooleanWithDefault(value, defaultValue);
}