如果数字为负数,则此属性返回true。
isNegative - 语法
num.isNegative
isNegative - 示例
void main() { int posNum=10; int negNum=-10; print(posNum.isNegative); print(negNum.isNegative); }
它将产生以下输出-
false true
参考链接
https://www.learnfk.com/dart-programming/dart-programming-isnegative-property.html
标签:posNum,negNum,isNegative,int,无涯,Dart,print,dart From: https://blog.51cto.com/u_14033984/8367070