如果数字为偶数,则此属性返回true。

isEven - 语法

num.isEven 

isEven - 示例

void main() { int posNum=10; print(posNum.isEven); } 

它将产生以下输出-

true

参考链接

https://www.learnfk.com/dart-programming/dart-programming-iseven-property.html