Dart is an open-source, general-purpose programming language created by Google in 2011. It is object-oriented, class-based, and type-safe, with a C-style syntax that is easy to pick up. Dart is best known as the language behind Flutter, but it also runs on servers, the command line, and the web.
Key Features -
- Type-Safe : Statically typed with sound null safety, catching many errors before the program runs, while still allowing type inference with
var. - Object-Oriented : Everything is an object, even numbers and functions; every object is an instance of a class.
- Compiles Two Ways : JIT (Just-In-Time) compilation gives fast hot reload during development; AOT (Ahead-Of-Time) compiles to fast native machine code for release.
- Cross-Platform : Runs on mobile, web, desktop, and servers from one codebase.
- Async Built-In : First-class support for asynchronous programming with Futures, Streams, and
async / await.
// every Dart program starts at main()
void main() {
print('Hello, Dart!');
}