Flutter & Dart
New

Dart Apprentice: Fundamentals

Dart Apprentice: Fundamentals is the first of a two-book series that will teach you all the basic concepts you need to master this powerful and versatile language. By Jonathan Sande.

Read for Free with the Beginner subscription* * Includes this and all other Beginner books in our online library See all benefits
Buy Individually $59.99 $35.99* *Includes access to all of our online reading features.
Login to leave a rating/review
Download materials
Buy paperback—Amazon Comments
Save for later
Share

Who is this for?

This book is for beginners to the Dart programming language, even if you’ve never programmed before. Readers with experience in another object-oriented language should be able to finish this book quickly and then move on to the intermediate topics covered in the second book of the series, Dart Apprentice: Beyond the Basics.

Covered concepts

  • Expressions
  • Variables and Constants
  • Types and Operations
  • Control Flow
  • Strings
  • Loops
  • Functions
  • Classes
  • Nullability
  • Lists
  • Sets
  • Maps
  • Iterables

Dart is an easy-to-learn yet powerful programming language. As one of the most versatile languages on the market today, you can use it to write anything from command-line apps and backend servers to native applications for Android, iOS, web, Mac, Windows and Linux. Dart was the language of choice for...

more

Before You Begin

This section tells you a few things you need to know before you get started, such as what you’ll need for hardware and software, where to find the project files for this book, and more.

Dart Apprentice: Fundamentals

1
Hide description
You'll set up your development environment to work with Dart, create your first Dart project and learn about its structure.
You’ll learn the basic concepts needed to start programming in Dart, such as variables and constants, comments and mathematical expressions. These will give you the foundation you need to progress in Dart.
Hide description
This chapter will teach you some of the main data types in Dart and the different operations you can perform on them. You’ll also learn about type conversion and type inference. Finally, you’ll see the difference between dynamically and statically typed languages.
Hide description
In this chapter, you’ll learn about strings and the way Dart represents text and characters using Unicode. You’ll also learn about concatenation and interpolation.
Hide description
Control flow allows you to determine what your program does at each step. Booleans, enums, switches and if-else statements give you the ability to set the path your program will follow.
Hide description
While-loops and for-loops give you the ability to repeat instructions in your code. They're another essential aspect of control flow.
Hide description
Functions allow you to organize your code in logical blocks.
Hide description
Classes are one of the most important concepts in object-oriented programming. They allow you to create types, defining their properties and what they can do.
Hide description
An important part of creating classes in Dart is learning about constructor methods, which include generative, named, forwarding and factory constructors.
Hide description
Static members are methods and properties of a class that belong to the class itself rather than to an object constructed from a class.
Hide description
Nullability allows you to handle the absence of a value while programming. While the concept of null is useful, it has traditionally plagued programmers who forget to deal with it. With sound null safety in Dart, though, it’s not possible to forget. Follow along to learn why.
Hide description
In almost every application you make, you’ll deal with data collections. Lists are the primary collection type you'll work with in Dart. They allow you to group values in an ordered sequence.
Hide description
A set is a collection of elements where the order isn't important and duplicate elements are ignored. Because of their characteristics, sets can be faster than lists for certain operations, especially when dealing with large datasets.
Hide description
A maps is a data structure that holds key-value pairs. The key is the variable name and the value is the data the variable holds.
Hide description
Iterables are what let you loop over collections. This chapter will teach you their characteristics and how to make custom iterables and their iterators.