Languages Features Creators CSV Resources Challenges Add Language
GitHub icon

Dart

Dart - Programming language

< >

Dart is a programming language created in 2011 by Lars Bak.

#51on PLDB 12Years Old 38.3kUsers
30Books 6Papers 738kRepos

Try now: Riju · TIO

Dart is a general-purpose programming language originally developed by Google and later approved as a standard by Ecma (ECMA-408). It is used to build web, server and mobile applications, and for Internet of Things (IoT) devices. It is open-source software under a permissive free software license (modified BSD license). Read more on Wikipedia...


Example from Compiler Explorer:
// Type your code here, or load an example. int square(int num) { return num * num; } int main(List<String> args) { return square(int.fromEnvironment("input")); }
Example from Riju:
void main() { print('Hello, world!'); }
Example from hello-world:
main() { print('Hello World'); }
// Hello world in Dart main() { print('Hello world!'); }
Example from Linguist:
import 'dart:math' as math; class Point { num x, y; Point(this.x, this.y); num distanceTo(Point other) { var dx = x - other.x; var dy = y - other.y; return math.sqrt(dx * dx + dy * dy); } } void main() { var p = new Point(2, 3); var q = new Point(3, 4); print('distance from p to q = ${p.distanceTo(q)}'); }
Example from Wikipedia:
// Import the math library to get access to the sqrt function. import 'dart:math' as math; // Create a class for Point. class Point { // Final variables cannot be changed once they are assigned. // Create two instance variables. final num x, y; // A constructor, with syntactic sugar for setting instance variables. Point(this.x, this.y); // A named constructor with an initializer list. Point.origin() : x = 0, y = 0; // A method. num distanceTo(Point other) { var dx = x - other.x; var dy = y - other.y; return math.sqrt(dx * dx + dy * dy); } // Example of Operator Overloading Point operator +(Point other) => new Point(x + other.x, y + other.y); } // All Dart programs start with main(). void main() { // Instantiate point objects. var p1 = new Point(10, 10); var p2 = new Point.origin(); var distance = p1.distanceTo(p2); print(distance); }

Keywords in Dart

abstract as assert async await break case catch class const continue covariant default deferred do dynamic else enum export extends external factory false final finally for get if implements import in is library new null operator part rethrow return set static super switch sync this throw true try typedef var void while with yield

Language features

Feature Supported Token Example
Hexadecimals ✓
// 0[xX][0-9a-fA-F]+
Conditionals ✓
Async Await ✓
Inheritance ✓
Switch Statements ✓
Exceptions ✓
Constants ✓
Classes ✓
While Loops ✓
Booleans ✓ true false
Strings ✓ '
'Hello world'
Regular Expression Syntax Sugar ✓
Print() Debugging ✓ print
Line Comments ✓ //
// A comment
Operator Overloading ✓
File Imports ✓
import 'file-system.dart';
import 'dart:math' as math;
MultiLine Comments ✓ /* */
/* A comment
*/
Comments ✓
// Hi
/* Assume address is not null. */
Case Insensitive Identifiers X
Semantic Indentation X

Books about Dart from ISBNdb

title authors year publisher
Dart for Absolute Beginners Kopec, David 2014 Apress
Web Programming with Dart Belchin, Moises and Juberias, Patricia 2014 Apress
Learning Dart Balbaert, Ivo and Ridjanovic, Dzenan 2014 Packt Publishing
Dart for Absolute Beginners Kopec, David 2014 Apress
Web Programming with Dart Belchin, Moises and Juberias, Patricia 2015 Apress
Flutter Cookbook: Over 100 proven techniques and solutions for app development with Flutter 2.2 and Dart Alessandria, Simone and Kayfitz, Brian 2021 Packt Publishing
Dart Apprentice (First Edition): Beginning Programming with Dart Tutorial Team, raywenderlich and Sande, Jonathan and Galloway, Matt 2021 Bowker
Dart Programming Language, The Bracha, Gilad 2015 Addison-Wesley Professional
Flutter for Beginners: An introductory guide to building cross-platform mobile applications with Flutter and Dart 2 Biessek, Alessandro 2019 Packt Publishing
Mastering Dart Akopkokhyants, Sergey 2014 Packt Publishing
Learning Dart Balbaert, Ivo and Ridjanovic, Dzenan 2014 Packt Publishing
Quick Start Guide to Dart Programming: Create High-Performance Applications for the Web and Mobile Sinha, Sanjib 2019 Apress
Dart Cookbook Balbaert, Ivo 2014 Packt Publishing
The Dart Programming Language Bracha, Gilad 2015 Addison-Wesley Professional
Introducing Dart Sass: A Practical Introduction to the Replacement for Sass, Built on Dart Libby, Alex 2019 Apress
Dart By Example Mitchell, Davy 2015 Packt Publishing
Quick Start Guide to Dart Programming: Create High-Performance Applications for the Web and Mobile Sinha, Sanjib 2019 Apress
Dart Cookbook Balbaert, Ivo 2014 Packt Publishing
Dart By Example Mitchell, Davy 2015 Packt Publishing
Dart 1 for Everyone: Fast, Flexible, Structured Code for the Modern Web Strom, Chris 2014 Pragmatic Bookshelf
Modern App Development with Dart and Flutter 2: A Comprehensive Introduction to Flutter (de Gruyter Stem) Meiller, Dieter 2021 De Gruyter Oldenbourg
Dart Essentials Martin Sikora 20150525 Packt Publishing
Beginning Dart Dylan McClung 2013 Apress
Dart in Action Chris Buckett 20130115 Simon & Schuster
Learning Dart - Second Edition Ivo Balbaert; Dzenan Ridjanovic 20150925 Packt Publishing
Learn Dart The Hard Way Sanjib Sinha 2019
App-Entwicklung mit Dart und Flutter 2 Dieter Meiller 20210920 De Gruyter
Moderne App-Entwicklung mit Dart und Flutter Dieter Meiller 20200505 De Gruyter
Modern App Development With Dart And Flutter 2 Dieter Meiller 2021 Walter De Gruyter Gmbh & Co Kg
Modern App Development with Dart and Flutter 2 Dieter Meiller 20210621 De Gruyter

Publications about Dart from Semantic Scholar

title authors year citations influentialCitations
Spicing Up Dart with Side Effects E. Meijer and K. Millikin and Gilad Bracha 2015 8 2
Type unsoundness in practice: an empirical study of Dart Gianluca Mezzetti and Anders Møller and Fabio Strocco 2016 6 0
Message safety in Dart Erik Ernst and Anders Møller and Mathias Schwarz and Fabio Strocco 2015 5 0
A Freights Status Management System Based on Dart and Flutter Programming Language Ghusoon Idan Arb and K. Al-Majdi 2020 3 0
JAVA and DART programming languages: conceptual comparison A. M. Hassan 2020 2 0
Ensuring that your dart will hit the mark: An introduction to dart contracts Patrice Chalin 2014 1 0
scheme.html · dart.html · modula-2.html

View source

- Build the next great programming language · Search · Day 214 · About · Blog · Acknowledgements · Traffic · Traffic Today · GitHub · feedback@pldb.com