Type Test Operators
Explore how to use Dart's type test operators to verify object types during program execution. This lesson helps you understand operator syntax and practical examples, enabling you to write precise and type-safe Dart code essential for effective Flutter development.
We'll cover the following...
We'll cover the following...
Overview
Type test operators are operators that can be used to check the type of an object at runtime. Below is a list of the type test operators supported by Dart.
| Operator | Use |
|---|---|
as |
typecast |
is |
True if the object has the specified type |