Logo
Pattern

Discover published sets by community

Explore tens of thousands of sets crafted by our community.

Dart Language Features

36

Flashcards

0/36

Still learning
StarStarStarStar

First-Class Functions

StarStarStarStar

Functions in Dart are first-class citizens, meaning they can be passed as arguments to other functions, assigned to variables, and returned from functions.

StarStarStarStar

Dart Null Safety

StarStarStarStar

Null safety in Dart means that variables can't hold null values by default, preventing null reference exceptions.

StarStarStarStar

Asynchronous programming with Futures and Streams

StarStarStarStar

Dart handles asynchronous operations with Futures and Streams, allowing you to write code that can execute in the background.

StarStarStarStar

Strongly Typed Language

StarStarStarStar

Dart is a strongly typed language, meaning that the type of variable is known at compile time. This helps catch errors early in the development process.

StarStarStarStar

Generics

StarStarStarStar

Dart supports generics, allowing you to write code that can work with any type in a type-safe way.

StarStarStarStar

Isolates for Concurrency

StarStarStarStar

Dart uses isolates as a way to handle concurrency, with each isolate having its own memory and running in its own thread.

StarStarStarStar

Extension Methods

StarStarStarStar

Dart allows you to add new functionality to existing classes via extension methods without modifying the original class.

StarStarStarStar

Named Constructors

StarStarStarStar

Dart classes can have multiple constructors with different names, allowing you to initialize your objects in various ways.

StarStarStarStar

Mixin-based Inheritance

StarStarStarStar

Dart supports mixin-based inheritance, allowing you to create a class body that can be reused in multiple class hierarchies.

StarStarStarStar

Collection if and spread

StarStarStarStar

The collection if and spread operators provide a concise way to conditionally insert items or merge multiple collections within lists or maps.

StarStarStarStar

Assertions

StarStarStarStar

An assertion is a runtime check that a boolean condition is true, used during debugging to ensure that an unexpected situation does not occur.

StarStarStarStar

Late Variables

StarStarStarStar

The 'late' keyword is used to delay initialization of a variable until it is actually used, which can help avoid null errors and potentially improve startup time.

StarStarStarStar

Named Parameters

StarStarStarStar

Dart functions can have named parameters, which allow you to specify arguments by their name for better readability and to make arguments order-independent.

StarStarStarStar

Metadata Annotations

StarStarStarStar

Dart provides metadata annotations, which can be used to provide additional information about the code to tools, compilers, or for reflection at runtime.

StarStarStarStar

Exception Handling

StarStarStarStar

Dart provides exception handling with try-catch blocks. You can catch specific exceptions or use a final block to execute code after an exception has been handled.

StarStarStarStar

Control Flow Collections

StarStarStarStar

Dart offers syntax to include if statements and for loops inside collections, which help in creating dynamic collections.

StarStarStarStar

Typedefs

StarStarStarStar

A typedef in Dart is used to create a user-defined name for a function type that can be used when declaring variables and return types.

StarStarStarStar

Getters and Setters

StarStarStarStar

Dart allows you to define getters and setters for your classes to control and validate changes to an object's properties, similar to other object-oriented languages.

StarStarStarStar

Enums

StarStarStarStar

Dart supports enumerations (enums), which are a set of named constant values. Enums are useful for defining a common set of related values.

StarStarStarStar

Sound Type System

StarStarStarStar

The Dart type system is sound, which means that if a variable is of a certain type, the compiler guarantees that it will always be of that type.

StarStarStarStar

Library and Visibility

StarStarStarStar

Dart uses libraries to organize and share code. A library can restrict the visibility of its content to other files with '_underscore' prefixes.

StarStarStarStar

Static Members

StarStarStarStar

Dart supports static methods and properties, which belong to the class itself rather than instances of the class.

StarStarStarStar

Operator Overloading

StarStarStarStar

Dart allows you to provide custom implementation for existing operators for your class using the operator keyword.

StarStarStarStar

String Interpolation

StarStarStarStar

Dart allows inserting values directly into strings without concatenation, through string interpolation, by using the '\\symbol.' symbol.

StarStarStarStar

Cascades Notation (..)

StarStarStarStar

Cascades (..) allow you to make a sequence of operations on the same object. This results in more fluent code and avoids the need to save the instance in a temporary variable.

StarStarStarStar

Factory Constructors

StarStarStarStar

Factory constructors enable a class to have multiple constructors that can return objects of various types, including subtypes or pre-existing instances.

StarStarStarStar

The 'required' keyword

StarStarStarStar

The 'required' keyword is used to specify that a named parameter in a function or constructor must be provided; it prevents the omission of parameters that are essential for a function's execution.

StarStarStarStar

Cascade Operator (..)

StarStarStarStar

The cascade operator (..) allows you to perform a sequence of operations on the same object.

StarStarStarStar

Interoperability with JavaScript

StarStarStarStar

Dart can interoperate with JavaScript, allowing you to use JavaScript libraries in your Dart applications with the help of the js package.

StarStarStarStar

Lambdas

StarStarStarStar

Dart supports lambda expressions — anonymous functions that are concise and can be passed around as arguments.

StarStarStarStar

Multi-Threaded Programming with Isolates

StarStarStarStar

Dart uses isolates to achieve concurrency, isolates are separate workers that don't share memory but can pass messages between each other.

StarStarStarStar

Conditional Import

StarStarStarStar

Dart supports conditional imports which make it possible to have different implementations of a library for different platforms.

StarStarStarStar

Iterable spreads

StarStarStarStar

In Dart, you can use the spread operator (...) to insert all elements of an iterable (like a list, set) into a collection.

StarStarStarStar

Records (proposed feature)

StarStarStarStar

Dart is considering adding records as a language feature to provide a simple way to represent data structures with value-based equality.

StarStarStarStar

Type Promotion

StarStarStarStar

Dart's control flow analysis promotes types within if-statements, which simplifies the handling of nullable types.

StarStarStarStar

Collection Literals

StarStarStarStar

Dart provides collection literals for easily creating lists, sets, or maps.

Know
0
Still learning
Click to flip
Know
0
Logo

© Hypatia.Tech. 2024 All rights reserved.