
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>OOP In Dart on Dart Tutorial - Learn Dart Programming</title>
    <link>https://dart-tutorial.com/object-oriented-programming/</link>
    <description>Recent content in OOP In Dart on Dart Tutorial - Learn Dart Programming</description>
    <generator>Bishworaj Poudel- Technology Channel</generator>
    <language>en-us</language><atom:link href="https://dart-tutorial.com/object-oriented-programming/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>OOP in Dart</title>
      <link>https://dart-tutorial.com/object-oriented-programming/oop-in-dart/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://dart-tutorial.com/object-oriented-programming/oop-in-dart/</guid>
      <description>OOP In Dart Object-oriented programming (OOP) is a programming method that uses objects and their interactions to design and program applications. It is one of the most popular programming paradigms and is used in many programming languages, such as Dart, Java, C++, Python, etc.
In OOP, an object can be anything, such as a person, a bank account, a car, or a house. Each object has its attributes (or properties) and behavior (or methods).</description>
    </item>
    <item>
      <title>Class in Dart</title>
      <link>https://dart-tutorial.com/object-oriented-programming/class-in-dart/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://dart-tutorial.com/object-oriented-programming/class-in-dart/</guid>
      <description>Class In Dart In object-oriented programming, a class is a blueprint for creating objects. A class defines the properties and methods that an object will have. For example, a class called Dog might have properties like breed, color and methods like bark, run.
Declaring Class In Dart You can declare a class in dart using the class keyword followed by class name and braces {}. It&amp;rsquo;s a good habit to write class name in PascalCase.</description>
    </item>
    <item>
      <title>Object in Dart</title>
      <link>https://dart-tutorial.com/object-oriented-programming/object-in-dart/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://dart-tutorial.com/object-oriented-programming/object-in-dart/</guid>
      <description>Object In Dart In object-oriented programming, an object is a self-contained unit of code and data. Objects are created from templates called classes. An object is made up of properties(variables) and methods(functions). An object is an instance of a class.
For example, a bicycle object might have attributes like color, size, and current speed. It might have methods like changeGear, pedalFaster, and brake.
Info Note: To create an object, you must create a class first.</description>
    </item>
    <item>
      <title>Class and Objects in Dart</title>
      <link>https://dart-tutorial.com/object-oriented-programming/class-and-objects-in-dart/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://dart-tutorial.com/object-oriented-programming/class-and-objects-in-dart/</guid>
      <description>What is Class A class is a blueprint for creating objects. A class defines the properties and methods that an object will have. If you want to learn more about class in Dart, you can read class in dart.
What is Object An object is an instance of a class. You can create multiple objects of the same class. If you want to learn more about an object in Dart, you can read object in dart.</description>
    </item>
    <item>
      <title>Constructor in Dart</title>
      <link>https://dart-tutorial.com/object-oriented-programming/constructor-in-dart/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://dart-tutorial.com/object-oriented-programming/constructor-in-dart/</guid>
      <description>Introduction In this section, you will learn about constructor in Dart programming language and how to use constructors with the help of examples. Before learning about the constructor, you should have a basic understanding of the class and object in dart.
Constructor In Dart A constructor is a special method used to initialize an object. It is called automatically when an object is created, and it can be used to set the initial values for the object&amp;rsquo;s properties.</description>
    </item>
    <item>
      <title>Default Constructor in Dart</title>
      <link>https://dart-tutorial.com/object-oriented-programming/default-constructor-in-dart/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://dart-tutorial.com/object-oriented-programming/default-constructor-in-dart/</guid>
      <description>Default Constructor The constructor which is automatically created by the dart compiler if you don&amp;rsquo;t create a constructor is called a default constructor. A default constructor has no parameters. A default constructor is declared using the class name followed by parentheses ().
Example 1: Default Constructor In Dart In this example below, there is a class Laptop with two properties: brand, and price. Lets create constructor with no parameter and print something from the constructor.</description>
    </item>
    <item>
      <title>Parameterized Constructor in Dart</title>
      <link>https://dart-tutorial.com/object-oriented-programming/parameterized-constructor-in-dart/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://dart-tutorial.com/object-oriented-programming/parameterized-constructor-in-dart/</guid>
      <description>Parameterized Constructor Parameterized constructor is used to initialize the instance variables of the class. Parameterized constructor is the constructor that takes parameters. It is used to pass the values to the constructor at the time of object creation.
Syntax class ClassName { // Instance Variables int? number; String? name; // Parameterized Constructor ClassName(this.number, this.name); } Example 1: Parameterized Constructor In Dart In this example below, there is a class Student with three properties: name, age, and rollNumber.</description>
    </item>
    <item>
      <title>Named Constructor in Dart</title>
      <link>https://dart-tutorial.com/object-oriented-programming/named-constructor-in-dart/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://dart-tutorial.com/object-oriented-programming/named-constructor-in-dart/</guid>
      <description>Named Constructor In Dart In most programming languages like java, c++, c#, etc., we can create multiple constructors with the same name. But in Dart, this is not possible. Well, there is a way. We can create multiple constructors with the same name using named constructors.
Info Note: Named constructors improves code readability. It is useful when you want to create multiple constructors with the same name.
Example 1: Named Constructor In Dart In this example below, there is a class Student with three properties: name, age, and rollNumber.</description>
    </item>
    <item>
      <title>Constant Constructor in Dart</title>
      <link>https://dart-tutorial.com/object-oriented-programming/constant-constructor-in-dart/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://dart-tutorial.com/object-oriented-programming/constant-constructor-in-dart/</guid>
      <description>Constant Constructor In Dart Constant constructor is a constructor that creates a constant object. A constant object is an object whose value cannot be changed. A constant constructor is declared using the keyword const.
Info Note: Constant Constructor is used to create a object whose value cannot be changed. It Improves the performance of the program.
Rule For Declaring Constant Constructor In Dart All properties of the class must be final.</description>
    </item>
    <item>
      <title>Encapsulation in Dart</title>
      <link>https://dart-tutorial.com/object-oriented-programming/encapsulation-in-dart/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://dart-tutorial.com/object-oriented-programming/encapsulation-in-dart/</guid>
      <description>Introduction In this section, you will learn about encapsulation in Dart programming language with examples. Encapsulation is one of the important concepts of object-oriented programming. Before learning about dart encapsulation, you should have a basic understanding of the class and object in dart.
Encapsulation In Dart In Dart, Encapsulation means hiding data within a library, preventing it from outside factors. It helps you control your program and prevent it from becoming too complicated.</description>
    </item>
    <item>
      <title>Getter in Dart</title>
      <link>https://dart-tutorial.com/object-oriented-programming/getter-in-dart/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://dart-tutorial.com/object-oriented-programming/getter-in-dart/</guid>
      <description>Getter In Dart Getter is used to get the value of a property. It is mostly used to access a private property&amp;rsquo;s value. Getter provide explicit read access to an object properties.
Syntax return_type get property_name { // Getter body } Info Note: Instead of writing { } after the property name, you can also write =&amp;gt; (fat arrow) after the property name.
Example 1: Getter In Dart In this example below, there is a class named Person.</description>
    </item>
    <item>
      <title>Setter in Dart</title>
      <link>https://dart-tutorial.com/object-oriented-programming/setter-in-dart/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://dart-tutorial.com/object-oriented-programming/setter-in-dart/</guid>
      <description>Setter In Dart Setter is used to set the value of a property. It is mostly used to update a private property&amp;rsquo;s value. Setter provide explicit write access to an object properties.
Syntax set property_name (value) { // Setter body } Info Note: Instead of writing { } after the property name, you can also write =&amp;gt; (fat arrow) after the property name.
Example 1: Setter In Dart In this example below, there is a class named NoteBook.</description>
    </item>
    <item>
      <title>Getter and Setter in Dart</title>
      <link>https://dart-tutorial.com/object-oriented-programming/getter-and-setter-in-dart/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://dart-tutorial.com/object-oriented-programming/getter-and-setter-in-dart/</guid>
      <description>Introduction In this section, you will learn about Getter and Setter in dart with the help of examples.
Getter And Setter Getter and Setter provide explicit read and write access to an object properties. In dart, get and set are the keywords used to create getter and setter. Getter read the value of property and act as accessor. Setter update the value of property and act as mutator.
Info Note: You can use same name for getter and setter.</description>
    </item>
    <item>
      <title>Inheritance in Dart</title>
      <link>https://dart-tutorial.com/object-oriented-programming/inheritance-in-dart/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://dart-tutorial.com/object-oriented-programming/inheritance-in-dart/</guid>
      <description>Introduction In this section, you will learn inheritance in Dart programming and how to define a class that reuses the properties and methods of another class.
Inheritance In Dart Inheritance is a sharing of behaviour between two classes. It allows you to define a class that extends the functionality of another class. The extend keyword is used for inheriting from parent class.
Info Note: Whenever you use inheritance, it always create a is-a relation between the parent and child class like Student is a Person, Truck is a Vehicle, Cow is a Animal etc.</description>
    </item>
    <item>
      <title>Inheritance Of Constructor in Dart</title>
      <link>https://dart-tutorial.com/object-oriented-programming/inheritance-of-constructor-in-dart/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://dart-tutorial.com/object-oriented-programming/inheritance-of-constructor-in-dart/</guid>
      <description>Introduction In this section, you will learn about inheritance of constructor in Dart programming language with the help of examples. Before learning about inheritance of constructor in Dart, you should have a basic understanding of the constructor and inheritance in Dart.
What Is Inheritance Of Constructor In Dart? Inheritance of constructor in Dart is a process of inheriting the constructor of the parent class to the child class. It is a way of reusing the code of the parent class.</description>
    </item>
    <item>
      <title>Super in Dart</title>
      <link>https://dart-tutorial.com/object-oriented-programming/super-in-dart/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://dart-tutorial.com/object-oriented-programming/super-in-dart/</guid>
      <description>Introduction In this section, you will learn about Super in Dart programming language with the help of examples. Before learning about Super in Dart, you should have a basic understanding of the constructor and inheritance in Dart.
What Is Super In Dart? Super is used to refer to the parent class. It is used to call the parent class&amp;rsquo;s properties and methods.
Example 1: Super In Dart In this example below, the show() method of the MacBook class calls the show() method of the parent class using the super keyword.</description>
    </item>
    <item>
      <title>Polymorphism in Dart</title>
      <link>https://dart-tutorial.com/object-oriented-programming/polymorphism-in-dart/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://dart-tutorial.com/object-oriented-programming/polymorphism-in-dart/</guid>
      <description>Introduction In this section, you will learn about polymorphism in Dart programming language with the help of examples. Before learning about polymorphism in Dart, you should have a basic understanding of the inheritance in Dart.
Polymorphism In Dart Poly means many and morph means forms. Polymorphism is the ability of an object to take on many forms. As humans, we have the ability to take on many forms. We can be a student, a teacher, a parent, a friend, and so on.</description>
    </item>
    <item>
      <title>Static in Dart</title>
      <link>https://dart-tutorial.com/object-oriented-programming/static-in-dart/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://dart-tutorial.com/object-oriented-programming/static-in-dart/</guid>
      <description>Introduction In this section, you will learn about dart static to share the same variable or method across all instances of a class.
Static In Dart If you want to define a variable or method that is shared by all instances of a class, you can use the static keyword. Static members are accessed using the class name. It is used for memory management.
Dart Static Variable A static variable is a variable that is shared by all instances of a class.</description>
    </item>
    <item>
      <title>Enum in Dart</title>
      <link>https://dart-tutorial.com/object-oriented-programming/enum-in-dart/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://dart-tutorial.com/object-oriented-programming/enum-in-dart/</guid>
      <description>Enum In Dart An enum is a special type that represents a fixed number of constant values. An enum is declared using the keyword enum followed by the enum&amp;rsquo;s name.
Syntax enum enumName { constantName1, constantName2, constantName3, ... constantNameN } Example 1: Enum In Dart In this example below, there is enum type named days. It contains seven constants days. The days enum type is used in the main() function.</description>
    </item>
    <item>
      <title>Abstract Class in Dart</title>
      <link>https://dart-tutorial.com/object-oriented-programming/abstract-class-in-dart/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://dart-tutorial.com/object-oriented-programming/abstract-class-in-dart/</guid>
      <description>Introduction In this section, you will learn about dart abstract class. Before learning about abstract class, you should have a basic understanding of class, object, constructor, and inheritance. Previously you learned how to define a class. These classes are concrete classes. You can create an object of concrete classes, but you cannot create an object of abstract classes.
Abstract Class Abstract classes are classes that cannot be initialized. It is used to define the behavior of a class that can be inherited by other classes.</description>
    </item>
    <item>
      <title>Interface in Dart</title>
      <link>https://dart-tutorial.com/object-oriented-programming/interface-in-dart/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://dart-tutorial.com/object-oriented-programming/interface-in-dart/</guid>
      <description>Introduction In this section, you will learn the dart interface and how to implement an interface with the help of examples. In Dart, every class is implicit interface. Before learning about the interface in dart, you should have a basic understanding of the class and objects, inheritance and abstract class in Dart.
Interface In Dart An interface defines a syntax that a class must follow. It is a contract that defines the capabilities of a class.</description>
    </item>
    <item>
      <title>Mixin in Dart</title>
      <link>https://dart-tutorial.com/object-oriented-programming/mixins-in-dart/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://dart-tutorial.com/object-oriented-programming/mixins-in-dart/</guid>
      <description>Introduction In this section, you will learn about dart mixins to reuse the code in multiple classes. Before learning about mixins you should have a basic understanding of class, object, constructor, and inheritance.
Mixin In Dart Mixins are a way of reusing the code in multiple classes. Mixins are declared using the keyword mixin followed by the mixin name. Three keywords are used while working with mixins: mixin, with, and on.</description>
    </item>
    <item>
      <title>Factory Constructor in Dart</title>
      <link>https://dart-tutorial.com/object-oriented-programming/factory-constructor-in-dart/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://dart-tutorial.com/object-oriented-programming/factory-constructor-in-dart/</guid>
      <description>Introduction In this section, you will learn about factory constructors with examples. Before learning about factory constructors, you should have a basic understanding of class and objects, constructor, abstract class, interface and inheritance in Dart.
Factory Constructor In Dart All of the constructors that you have learned until now are generative constructors. Dart also provides a special type of constructor called a factory constructor.
A factory constructor gives more flexibility to create an object.</description>
    </item>
    <item>
      <title>Generic in Dart</title>
      <link>https://dart-tutorial.com/object-oriented-programming/generics-in-dart/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://dart-tutorial.com/object-oriented-programming/generics-in-dart/</guid>
      <description>Introduction This tutorial will teach you about dart Generics, how to create generics classes and methods with examples.
Generics In Dart Generics is a way to create a class, or function that can work with different types of data (objects). If you look at the internal implementation of List class, it is a generic class. It can work with different data types like int, String, double, etc. For example, List&amp;lt;int&amp;gt; is a list of integers, List&amp;lt;String&amp;gt; is a list of strings, and List&amp;lt;double&amp;gt; is a list of double values.</description>
    </item>
    <item>
      <title>Questions for Practice 6</title>
      <link>https://dart-tutorial.com/object-oriented-programming/questions-for-practice-6/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://dart-tutorial.com/object-oriented-programming/questions-for-practice-6/</guid>
      <description>Questions For Practice 6 Write a dart program to create a class Laptop with properties [id, name, ram] and create 3 objects of it and print all details. Write a dart program to create a class House with properties [id, name, price]. Create a constructor of it and create 3 objects of it. Add them to the list and print all details. Write a dart program to create an enum class for gender [male, female, others] and print all values.</description>
    </item>
  </channel>
</rss>