Category: 04. Dart
-
Collection
Dart, unlike other programming languages, doesn’t support arrays. Dart collections can be used to replicate data structures like an array. The dart:core library and other classes enable Collection support in Dart scripts. Dart collections can be basically classified as − Sr.No Dart collection & Description 1 ListA List is simply an ordered group of objects.…
-
Object
Object-Oriented Programming defines an object as “any entity that has a defined boundary.” An object has the following − The period operator (.) is used in conjunction with the object to access a class’ data members. Example Dart represents data in the form of objects. Every class in Dart extends the Object class. Given below is a…
-
Classes
Dart is an object-oriented 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 Use the class keyword to declare a class in Dart. A class definition starts with the keyword class followed…
-
Interfaces
An interface defines the syntax that any entity must adhere to. Interfaces define a set of methods available on an object. Dart does not have a syntax for declaring interfaces. Class declarations are themselves interfaces in Dart. Classes should use the implements keyword to be able to use an interface. It is mandatory for the implementing class to…
-
Functions
Functions are the building blocks of readable, maintainable, and reusable code. A function is a set of statements to perform a specific task. Functions organize the program into logical blocks of code. Once defined, functions may be called to access code. This makes the code reusable. Moreover, functions make it easy to read and maintain…
-
Enumeration
An enumeration is used for defining named constant values. An enumerated type is declared using the enum keyword. Syntax Where, Each of the symbols in the enumeration list stands for an integer value, one greater than the symbol that precedes it. By default, the value of the first enumeration symbol is 0. For example Example It will…
-
Runes
Strings are a sequence of characters. Dart represents strings as a sequence of Unicode UTF-16 code units. Unicode is a format that defines a unique numeric value for each letter, digit, and symbol. Since a Dart string is a sequence of UTF-16 code units, 32-bit Unicode values within a string are represented using a special…
-
Symbol
Symbols in Dart are opaque, dynamic string name used in reflecting out metadata from a library. Simply put, symbols are a way to store the relationship between a human readable string and a string that is optimized to be used by computers. Reflection is a mechanism to get metadata of a type at runtime like…
-
Lists (Basic Operations)
In this chapter, we will discuss how to carry out some basic operations on Lists, such as − Sr.No Basic Operation & Description 1 Inserting Elements into a ListMutable Lists can grow dynamically at runtime. The List.add() function appends the specified value to the end of the List and returns a modified List object. 2 Updating a…