getLocalDouble method

double? getLocalDouble(
  1. String identifier, [
  2. double defaultValue = 0
])

Implementation

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