Dart Tutorial #23 - Class in Dart Programming (Object Oriented Programming) & Constructors

Описание к видео Dart Tutorial #23 - Class in Dart Programming (Object Oriented Programming) & Constructors

Dart Tutorial #23 - Class in Dart Programming (Object Oriented Programming) & Constructors
In this video by Programming for Beginners we will see Class in Dart Programming (Object Oriented Programming), using Dart Tutorial videos. We can learn Dart Programming language to make web applications or mobile applications using flutter framework. Also we can make single-page web applications using Dart programming.
Dart is an object-oriented programming language. It supports object-oriented programming features like classes, interfaces, etc. A class in terms of OOP is a blueprint for creating objects. A class encapsulates data for the object. Dart gives built-in support for this concept called class.

Declaring a Class
class class_name {
fields
getters/setters
constructors
functions
}

Dart Constructors
A constructor is a special function of the class that is responsible for initializing the variables of the class. Dart defines a constructor with the same name as that of the class. A constructor is a function and hence can be parameterized.
Syntax:
Class_name(parameter_list) {
//constructor body
}

this Keyword
The this keyword refers to the current instance of the class. Here, the parameter name and the name of the class’s field are the same. Hence to avoid ambiguity, the class’s field is prefixed with the this keyword.

Dart Tutorial Playlist:
   • Dart Tutorial  

VS Code Editor:
https://code.visualstudio.com/download
Online Dartpad:
https://dartpad.dartlang.org/
Dart SDK:
https://www.dartlang.org/install/arch...

YouTube Gears:
Microphone: https://amzn.to/3iIk5K3
Mouse: https://amzn.to/35irmNF
Laptop: https://amzn.to/3iG0jyD

#Dart #Tutorial #Programming

============================
LIKE | SHARE | COMMENT | SUBSCRIBE

Thanks for watching :)

Комментарии

Информация по комментариям в разработке