Classes, Constructors, and Objects - Flutter | Dart ~ Episode 1.6

Опубликовано: 08 Сентябрь 2021
на канале: David Weiss
6,482
145

Hey Coders! This one is going to be a slow burn. The topic of classes is extremely important in your journey of programming with Dart and Flutter, but it is also an extremely vast topic, and it can also be very hard to understand at times. Think of it like this: classes are the blueprint for creating your user-defined objects. Every time you want to make a new instance of your object, your code will reference its respective class. Classes are broken into four sections: the instance variables, the getter/setter methods, the constructor, and the methods. We'll do a cursory overview of all of these important sections, along with a quick look at inheritance in this video!

Check out the source code on GitHub:
https://github.com/davidtheweiss/Flut...

❤️ Support the ongoing growth of this channel, get exclusive perks, and receive consultation on your projects!   / davidweissprogramming  

🧑‍💻 Dart Documentation: https://dart.dev/guides

----------------------------------------------------------------------------------------------
🕒 Timestamps
0:00 Intro
0:14 What are Objects?
1:37 Defining a Duck Object's Properties and Methods
3:00 What are Classes?
3:37 The Anatomy of a Class
4:58 Using Classes to Create New Instances
7:57 The "Dot" Operator
9:29 The User-Defined Pez Dispenser Class, in Action!
11:14 Instance Variables
12:29 Following Null Saftey Rules When Defining Properties
14:34 Getter/Setter Methods
16:06 Changing Your Property to Private For More Control
17:35 The Constructor Method
20:40 Named Constructors
21:33 Initializer Lists
24:12 Defining a Class's Methods
25:36 Primer on Inheritance Using the "extends" Keyword
28:14 The @override Annotation
29:08 Inheriting a Superclass's Constructor with the "super()" Method
----------------------------------------------------------------------------------------------
Other playlists:

-------------------------------------
Flutter
-------------------------------------
Dart:
   • Flutter - Season 1 | Dart  

Flutter Orientation:
   • Flutter - Season 0 | Orientation  

-------------------------------------
Google Cloud
-------------------------------------
Compute Engine:
   • Google Cloud - Season 2 | Compute Engine  

App Engine:
   • Google Cloud - Season 1 | App Engine  

Google Cloud Orientation:
   • Google Cloud - Season 0 | Orientation  

-------------------------------------
Apps Script
-------------------------------------
JDBC Service:
   • Apps Script - Season 16 | JDBC Service  

Data Studio Service:
   • Apps Script - Season 15 | Data Studio...  

Maps Service:
   • Apps Script - Season 14 | Maps Service  

Utilities Service:
   • Apps Script - Season 13 | Utilities S...  

Properties Service:
   • Apps Script - Season 12 | Properties ...  

URL Fetch Service:
   • Apps Script - Season 11 | URL Fetch S...  

Drive Service:
   • Apps Script - Season 10 | Drive Service  

Forms Service:
   • Apps Script - Season 9 | Forms Service  

Lock Service:
   • Apps Script - Season 8 | Lock Service  

HTML Service:
   • Apps Script - Season 7 | HTML Service  

Document Service:
   • Apps Script - Season 6 | Document Ser...  

Slides Service:
   • Apps Script - Season 5 | Slides Service  

Calendar Service:
   • Apps Script - Season 4 | Calendar Ser...  

Script Service:
   • Apps Script - Season 3 | Script Service  

Gmail Service:
   • Apps Script - Season 2 | Gmail Service  

Spreadsheet Service:
   • Apps Script - Season 1 | Spreadsheet ...  

Apps Script Orientation:
   • Apps Script - Season 0 | Orientation  
----------------------------------------------------------------------------------------------