toNonNullList method

List toNonNullList([
  1. List def = const []
])

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

Implementation

List toNonNullList([List def = const []]) => isNullOrEmpty ? def : this!;