Programming in Dart: Classes
In this final course in the Programming with Dart series, you’ll be introduced to one of the most important aspects of the language: classes. You’ll learn how to define your own classes and how to use the object oriented features in the Dart programming language. By Brian Moakley.
Learning path
This is part of the Flutter Fundamentals learning path. View path.
Who is this for?
This course is written for people who are new programming! If you don’t know the difference between a function and an object, you’ve come to the right place.
Before starting, you should have watched Programming in Dart: Fundamentals, Programming in Dart: Control Flow & Collections and Programming in Dart: Functions & Closures. This course will build on those foundational concepts and expand on your understanding of the Dart programming language.
Covered concepts
- Classes
- Constructors
- Initilization lists
- Multiple constructors
- Static members
- Enumerations
- Inheritance & overriding
- Abstract classes
- Interfaces
- Mixins
- Generic classes
Part 1: Understand Classes
Get an overview of Dart’s object orientated features by the way of classes.
Learn the basics of classes and how to define them using the Dart programming language.
Now that you know how to define a class, you’ll put your knowledge to the test by developing character states.
Learn about constructors and how to define constructors in classes. Then, you’ll call them to create objects.
Once you have a good idea on how to create a constructor, you’ll put your knowledge to the test by creating a very specific constructor.
Understand the basics of initialization lists and how to use them to build your objects.
Learn how to define multiple constructors in your classes using something known as named constructors.
Understand how static members work on your Dart objects by defining class based constants.
Learn how to group your constants together in one construct known as an enumeration and how to use it in your code.
With this part complete, you’ll get a review of all the various aspects of Dart object oriented programming.
Part 2: Learn Inheritance
Now that you have a good idea about how to use classes, you’ll learn some of Dart’s class features to level up your skills.
Learn about the concept of class inheritance then see how it works using Dart.
See how to to provide different implementations of methods in child classes.
Put your method overriding skills to the test in this episode’s challenge.
Learn the concept of an abstract class and learn why abstract classes are useful in your program.
Understand the concept of Dart interfaces and how you can use them to define behavior in your subclasses.
Level up your generic programming skills by learning how to apply generic concepts to classes.
Add new behavior to your classes by this useful language feature called Mixins.
Get an overview of all the various language features available to you in Dart programming language that weren’t covered in this course.
In this final episode, you’ll review everything that was covered and learn where to go next.