Getting an object’s type
To get an object’s type at runtime,you can use Object’s runtimeType
property,which returns a Type object.
print('The type of a is ${a.runtimeType}');
Up to here, you’ve seen how to use classes.The rest of this section shows how to implement classes.