Watch this episode for free — or access the full course as a raywenderlich.com Professional Subscriber. Learn more here
Programming in Dart: Classes
Part 1: Understand Classes Introduction
— Flutter & Dart

Lesson Complete

Play Next Lesson
Next

Introduction

Get an overview of Dart’s object orientated features by the way of classes.

Contributors

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.

Reviews

Comments