In Dart, everything is an object, including the built-in types. Upon defining a new class, even when you don't extend anything, it will be a descendant of an object. Dart implicitly does this for you.
Dart is called a true object-oriented language. Even functions are objects, which means that you can do the following:
- Assign a function as a value of a variable.
- Pass it as an argument to another function.
- Return it as a result of a function as you would do with any other type, such as String and int.
This is known as having first-class functions because they're treated the same way as other types.
Another important point to note is that Dart supports single inheritance on a class, similar to Java and most other languages...