toNonNullInt method

int toNonNullInt([
  1. int def = 0
])

判断是否为null,如果为null则返回默认值

Implementation

int toNonNullInt([int def = 0]) => isNull ? def : this!;