如果数字是奇数,则此属性返回布尔值true。 语法 num.isOdd 示例 void main() { int posNum = 10; print(posNum.isOdd); } 执行上面示例代码,得到以下结果 - false 上一篇: Dart数字 下一篇: Dart字符串