Assert in place of ArgumentError for null checks (#5612)
For consistency with the rest of dart:ui, check required parameters with assert(param != null) rather than throwing ArgumentError. ArgumentError is typically reserved for checking the validity of non-null args -- e.g. that a list has the required number of elements.
Showing
想要评论请 注册 或 登录