orDefault method

double orDefault([
  1. double defaultValue = 0.0
])

安全获取值,如果为 null 则返回默认值

Implementation

double orDefault([double defaultValue = 0.0]) {
  return this ?? defaultValue;
}