From the course: Flutter Essential Training: Build for Multiple Platforms

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Overview of classes and objects: Part 1

Overview of classes and objects: Part 1

- [Instructor] Dart is an object-oriented language with classes and mixin-based inheritance. If you have worked with any other object-oriented language, you must have worked with classes and objects. So, I'm assuming you already know the basics around them. And in this course, we will go through only the concepts that are special to Dart. But before that, let's revisit some of the basic concepts, just in case you need a refresher. This is what a class declaration looks like, and name and age are called the instance variables. This is the default constructor. However, in Dart, a default constructor is automatically created for you, if you do not declare one yourself. So, you can omit this default constructor. Creating an object is the same as any other popular OOP language. In some languages, we write the new keyword when creating a new object of a class. But as you can see in the info warning here, that the new keyword is…

Contents