Dart – Null Safety

Null safety prevents errors that result from unintentional access of variables set to null. Nullable Types (?) : To specify if the variable can be null, then you can use the nullable type  operator. You don’t need to initialize a nullable variable before using it. It is initialized to null by default. The Assertion Operator (!) :… Continue reading Dart – Null Safety

Dart – Map

Maps Maps is an unordered pair of key and values. The keys of the map must unique, values can be the same. Map is also called dictionary or hash .The size of a map is not fixed, we can add, delete edit the values of the map. The size of the map depends upon the number of elements in… Continue reading Dart – Map

Published
Categorized as Dart Tagged

Dart – Set

Set A set is an unordered collection of values. We can’t get the values by their index values as they are unordered. Values in set are unique i.e. they can’t be repeated. Creating a Set using a constructor: Creating a Set using List Inserting elements in Set

Published
Categorized as Dart Tagged

Dart – List

List A list is an array of elements arranged in an ordered sequence. There are two types of List: Fixed-Length List Growable List Fixed-Length List is a list that can’t be changed once initialized whereas the Growable list is dynamic in nature. Fixed-length List Creating a Fixed-length List The indexing value start with 0 and end with listOfLength-1 .… Continue reading Dart – List

Published
Categorized as Dart Tagged

Dart – Iterable

Iterable Iterable is an extract class, it can’t de instantiate directly. An Iterable of string and int The difference with List and Iterable is that that element in the list can be accessed with their index value using [] operator while in Iterable value can’t be accessed using [] operator. If we run the above program. We get the… Continue reading Dart – Iterable

Published
Categorized as Dart Tagged