Getting Familiar with Dart

Overview


In the first part of the course, you’ll learn the basics of Dart, which is a high-level programming language. High-level programming languages abstract away details of the computer hardware, such as memory management and CPU registers, and are closer to human language than machine code.

For working on this part, we recommend using an editor such as VSCode with the Dart extension installed. The Dart extension provides features such as syntax highlighting, code completion, and debugging support. In addition, you’ll need to install the Dart SDK to run Dart programs.

These materials have been tested with Dart version 3.5. They should be compatible with version 3.6. from December 2024 (and newer versions).

Although this course expects that you have prior programming experience, we’ll start from basics just in case it’s been a while since you’ve last programmed.

The structure of this part is as follows:

  • Dart at a Glance introduces the structure of Dart programs and discusses programming languages more broadly, including the difference between compiled and interpreted languages, and statically and dynamically typed languages.

  • Functions discusses the basics of functions in Dart, including how to define functions, pass arguments, and return values.

  • Control Flow covers the basic control flow structures in Dart, including conditional statements, switch statements, and loops.

  • Collections and Iterables introduces lists and maps and shows how to iterate over them. The chapter also shows common operations on collections, such as filtering and mapping.

  • String Processing covers looping over contents of a string, looking for content in a string, peculiarities related to Unicode, and using regular expressions.

  • Classes and Objects discusses object-oriented programming and introduces classes, objects, constructors, and enums in Dart.

Finally, at the end, the chapter Recap and Feedback provides a summary of the part and asks for feedback on the materials.

We’ll build on the knowledge from this part when starting to build an interpreter for a programming language in the second part of the course.