Prefer is! operatorDRT-W1149
When checking if an object is not of a specified type, it is preferable to use the 'is!' operator.
BAD:
if (!(foo is Foo)) {
...
}
GOOD:
if (foo is! Foo) {
...
}
When checking if an object is not of a specified type, it is preferable to use the 'is!' operator.
BAD:
if (!(foo is Foo)) {
...
}
GOOD:
if (foo is! Foo) {
...
}