dart

dart

Conditional expression in Dart

Conditional expressions are used in place of if-else statements. These expressions are short, concise and easy to understand.

Read
dart

What is cascade notation or method chaining in Dart

Cascade notation or (..) is used for method chaining in dart. With method chaining, you can create one single object with a sequence of methods. It is like a different concise way to create one object.

Read
dart

How to use stagehand to create dart projects

stagehand is a tool to create one dart project easily using the command line. You can use it on command line and create different types of projects. It comes with a couple of different templates that you can use to quickly create your dart project with the minimum required files.

Read
dart

Using optional parameters as required in dart

Optional parameters in a dart function are optional i.e. even if we don't pass them to a function, the program will work. But, if you want to change one optional parameter to required, you can either change it directly to required or use the required annotation. The program will still work if you use the required annotation but it will show one warning.

Read
dart

Dart scope and lexical scoping

Scope is the area that we can access one variable or function. If two variables are under the same scope, one can access another. If they are in different scopes, the program will throw an error.

Read
dart

Dart program to find factorial of a number recursively

The factorial is the product of a number and all the numbers less than it. For example, factorial of 4 is 4 * 3 * 2 * 1 i.e. 24. If you want to find the factorial programmatically, you can either use one loop and multiply all numbers starting from 2 to that number or you can use one recursive method.

Read
dart

Different examples to create dart functions

This post will show you different examples of dart functions. Basically, the following three are the main points in a dart function :.

Read
dart

Dart function introduction with examples

Functions are blocks of reusable code. If you have a piece of code that is used in multiple places of your program, you can put it in a function and use it instead of the same code block. A function can take values and it can return one result.

Read
dart

Keywords in dart

Keywords are treated differently. Like other programming languages, keywords are words you can't use as identifiers. Actually, you can use a few keywords as identifiers but you shouldn't if you want to follow the best practices.

Read
dart

Runes in dart explanation with example

Every character, digit, and symbol is defined by a unique numeric value in the computer system. It is called Unicode. It is unique and adopted by almost all modern systems. Using Unicode, data transfer became easy. For example, if you are sending one smiley on a chat app, it will send the Unicode value of that smiley. The other device will read this value and show it as a smiley.

Read