Programming in Dart: Classes

Jun 28 2022 · Dart 2.17, Flutter 3.0, DartPad

Part 1: Understand Classes

01. Introduction

Episode complete

Play next episode

Next
About this episode

Leave a rating/review

See forum comments
Cinema mode Mark complete Download course materials
Next episode: 02. Create a Class
Transcript: 01. Introduction

Hey what’s up everybody! This is Brian and welcome to Programming in Dart: Classes. This is the fourth and final course that teaches you the Dart programming language from the ground up.

When we last were on our Dart journey, we wandered through the desert of functions and closures but now, we’ve arrived in a valley of milk and honey - classes. Classes and by extension, object oriented programming is a key aspect of writing Dart programs. In fact, when you write your Dart programs, you program is going be composed of hundreds of different objects that interact with each other.

But, and here’s a Matrix moment for you, you’ve been already been using objects in Dart. In fact, most everything is an object. Those strings, ints and doubles - they are all objects. Lists, sets and maps? Objects. Even functions are objects. Almost everything in Dart is an object.

When we write our programs, we define the templates of our objects - called classes and then create instances of our objects that interact with each other. Naturally, this course will teach how to define your objects

For this course, you don’t need to download any fancy programming tools. You’ll be doing all your Dart coding in a browser. This means you should have a modern browser like Firefox or Chrome.

This course starts with an introduction of classes. You’ll learn what they are and how to define them.

Then you’ll learn how to create a class constructor.

Then you’ll be introduced to initialization lists.

After which, you’ll define multiple constructors in one class.

Then you’ll learn about creating static members.

Finally, we close out this part with a discussion on enumerations.

In addition to what I just covered, the course contains several hands-on challenges, where you’ll get to practice what you’ve just learned on your own. It’s in your best interest to actually pause the video and try solving the challenges - you’ll learn a ton by doing this.

Also, a few of the examples were taking from the Dart apprentice book. This is a book that teaches Dart programming language and is included as part of the Ultimate Beginner subscription so by all means, definitely read that book when you are finished, or read it alongside the video course for maximum affect.

Okay, I know what you are thinking. Enough talking. Let’s get started and that naturally starts with a discussion about classes.