getLocalBool method

bool? getLocalBool(
  1. String identifier, [
  2. bool defaultValue = false
])

Implementation

bool? getLocalBool(String identifier, [bool defaultValue = false]) {
  var result = ValuePointer<Value>();
  if (variables != null &&
      variables!.tryGetValueWithIdentifier(identifier, result)) {
    if (result.value == null) {
      return false; // variable found, but its value was null!
    }
    return result.value?.boolValue();
  }
  return defaultValue;
}