Dart中的惯用写法`is not`是什么意思?

5
"is not"的表达方式是否有比!(o is T)更符合习惯用语的方式?
/// Object (o) is not type (T)
/// 
/// Syntax that works but is not concise: `!(o is T)`

final word = 'drow';

if (!(word is String)) print('undoable');
1个回答

7

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接