Dart Exceptions

An exception (or exceptional event) is a problem that arises during the execution of a program. Sr.No Exceptions & Description 1 DeferredLoadException Thrown when a deferred library fails to load. 2 FormatException Exception thrown when a string or some other data does not have an expected format and cannot be parsed or processed. 3 IntegerDivisionByZeroException… Continue reading Dart Exceptions

Dart – Class

In object-oriented programming, a class is a blueprint for creating objects. A class defines the properties and methods that an object will have. Declaring Class In Dart You can declare a class in dart using the class keyword followed by class name and braces {}. It’s a good habit to write class name in PascalCase.  Syntax: The class keyword is… Continue reading Dart – Class

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