Dart is an object-oriented, class-based programming language that's used for building web, server, desktop, and mobile applications. The Dart programming language has a number of keywords that have special meanings. Some of these include:
- abstract: Used before a class to define it as abstract, which means it can't be instantiated, only inherited.
- as: Used for type casting.
- assert: Used for debugging. It disrupts normal execution if a boolean condition is false.
- async, await: Used to denote asynchronous operations.
- break: Used to exit from a loop or switch-case statement.
- case, default: Used in switch-case statements.
- class: Used to define a class.
- const: Denotes that a variable is a compile-time constant.
- continue: Used to skip the rest of the current loop iteration and move to the next one.
- dynamic: Denotes that the type of the variable is dynamic and can change.
- else, if: Used for conditional statements.
- enum: Used to define an enumeration.
- extends: Used for class inheritance.
- final: Denotes that a variable can only be set once.
- for, while, do: Used for looping.
- get, set: Used for getter and setter methods.
- import, export, library, part, part of: Used for managing Dart libraries.
- in: Used in for-each loop.
- is: Type checking keyword.
- new: Used to create an instance of a class.
- null: Represents the absence of a value.
- return: Used to specify what a function should return.
- static: Indicates that a member is available on the class itself instead of on instances of the class.
- super: Used to refer to the immediate superclass of a class.
- switch: Used for multi-condition checks.
- this: Refers to the current instance of a class.
- throw, try, catch, on, finally: Used for error and exception handling.
- var: Used to declare a variable without specifying its type.
- void: Indicates that a function doesn't return a value.
- with: Used for mixin.
yield, yield*: Used in generator functions.
Please note that Dart's syntax is evolving, and new keywords may be added in future versions of the language.
Comments
Post a Comment