Mukul Latiyan has Published 474 Articles

Test type operators in Dart Programming

Mukul Latiyan

Mukul Latiyan

Updated on 24-May-2021 12:21:49

152 Views

There are certain cases where we want to check if a variable is of a certain data type or not. Dart provides two test type operators that we can make use of.These two test type operators are −is - return true if that variable of the type we are checking ... Read More

Ternary Operator in Dart Programming

Mukul Latiyan

Mukul Latiyan

Updated on 24-May-2021 12:21:25

8K+ Views

The ternary operator is a shorthand version of an if-else condition. There are two types of ternary operator syntax in Dart, one with a null safety check and the other is the same old one we encounter normally.Syntax 1condition ? expressionOne : expressionTwo;The above syntax implies that if a certain ... Read More

Switch statements in Dart Programming

Mukul Latiyan

Mukul Latiyan

Updated on 24-May-2021 12:21:02

128 Views

Switch statements help us in cases where we want to run specific code based on certain conditions. It's true that if-else conditions also help us in the same section of code, but the switch statements reduce the complexity of the program as we will end up with less code in ... Read More

Super keyword in Dart Programming

Mukul Latiyan

Mukul Latiyan

Updated on 24-May-2021 12:20:36

527 Views

Super keyword in dart is used to refer to the parent's class object's methods or variables. In simple terms, it is used to refer to the superclass properties and methods.The most important use of the super keyword is to remove the ambiguity between superclass and subclass that have methods and variables ... Read More

Super constructor in Dart Programming

Mukul Latiyan

Mukul Latiyan

Updated on 24-May-2021 12:19:58

589 Views

The subclass can inherit the superclass methods and variables, but it cannot inherit the superclass constructor. The superclass constructor can only be invoked with the use of the super() constructor.The super() constructor allows a subclass constructor to explicitly call the no arguments and parametrized constructor of superclass.SyntaxSubclassconstructor():super(){ }Though, it is not even necessary ... Read More

String Properties in Dart Programming

Mukul Latiyan

Mukul Latiyan

Updated on 24-May-2021 12:19:26

169 Views

Strings in Dart have certain properties attached to them. These properties come in handy in different use cases.The most common used string properties are −hashCodeisEmptyisNotEmptylengthrunesIn this article, we will explore all the above mentioned properties of a string.hashCodeThe hashCode property of a string is used to print the hashCode number of ... Read More

String Methods in Dart Programming

Mukul Latiyan

Mukul Latiyan

Updated on 24-May-2021 12:18:58

529 Views

String class in Dart contains different methods that we use to make working with strings easier and more expressive.There are many methods present in the String class, some of the common ones are −contains(Pattern)trim()toLowerCase()toUpperCase()split(Pattern)compareTo(another string)We will explore each of the above string methods in this article.contains() methodThe contains() method is ... Read More

String Interpolation in Dart Programming

Mukul Latiyan

Mukul Latiyan

Updated on 24-May-2021 11:57:58

2K+ Views

There are times when we want to make use of variables inside the statement that is made up of string values.We know that we can add two strings together in Dart with the help of the + symbol operator. But to make use of a variable in between the strings ... Read More

String in Dart Programming

Mukul Latiyan

Mukul Latiyan

Updated on 24-May-2021 11:57:31

230 Views

A String in dart is a sequence or series of characters. The characters can be - special characters, numbers or letters. In Dart, we can represent strings with both the single quotes and double quotes.Example'a string value' or "another string value"Both the examples are valid examples of a string in ... Read More

Set in Dart Programming

Mukul Latiyan

Mukul Latiyan

Updated on 24-May-2021 11:57:07

323 Views

A set is a collection of objects in which each object can occur exactly once. It implies that all the objects in the element type, are either in the set or not in the set.A set is an important data structure and is very helpful in cases where we need ... Read More

Advertisements