Chapters

Hide chapters

Dart Apprentice: Beyond the Basics

First Edition · Flutter · Dart 2.18 · VS Code 1.71

Dart Apprentice: Beyond the Basics

Section 1: 15 chapters
Show chapters Hide chapters

Dart is a modern and powerful programming language. Google intentionally designed it to be unsurprising. In many ways, it’s a boring language, and that’s a good thing! It means Dart is fast and easy to learn. While Dart does have some unique characteristics, if you have any experience with other object-oriented or C-style languages, you’ll immediately feel at home with Dart.

Many people are learning Dart because of the Flutter UI framework. It was no accident that Flutter chose Dart as its language. The Dart virtual machine allows lightning-fast development-time rebuilds, and its ahead-of-time compiler creates native applications for every major platform. As one of the most versatile languages on the market today, you can use Dart to write anything from command-line apps and backend servers to native applications for Android, iOS, web, Mac, Windows, Linux and even embedded devices.

It’s no wonder then that developers across the world have taken notice. Rather than completely rewriting the same application in different languages for multiple platforms, developers save countless hours by using a single language and a shared codebase. This translates to a win for companies as well because they save money without sacrificing speed.

So, welcome!

About This Book Series

In its original form, this book started as a single, 10-chapter volume called Dart Apprentice. While writing the second edition, we broke the overly-long chapters into more manageable sub-topics, rearranged the teaching order, expanded the explanations and examples, and added completely new chapters. The original 10 chapters grew to almost 30. We didn’t want to overwhelm readers with a massive doorstop but to provide them with a learning path that they could complete in measurable steps. For this reason, we split Dart Apprentice into two volumes:

  1. Dart Apprentice: Fundamentals is the first of the two-part series. It covers basic programming concepts like expressions, data types, control flow, loops, functions, classes and collections. Readers who complete this book have reached the upper-beginner level.
  2. Dart Apprentice: Beyond the Basics, the book you have here, builds on the concepts you learned in Dart Apprentice: Fundamentals and introduces new topics like string manipulation, anonymous functions, inheritance, interfaces, generics, error handling and asynchronous programming. If you complete this book, you can consider yourself a solid intermediate-level programmer in Dart.

Book Sample Projects

The book comes with supplemental material that’s available as an online GitHub repository. In each chapter folder, you’ll find a folder called starter that contains a starter project with an empty main function. You can either open this empty project in your editor by going to File ▸ Open in the menu, or just create a new project.

In addition to the starter project, chapters will also have final and challenge folders. You can refer to the final folder if you get lost during the lesson. It’ll contain the code from that lesson. Likewise, the challenge folder will contain the answers to the exercises and challenges from that chapter. You’ll learn the most if you don’t copy and paste this code but type it yourself.

Exercises

You’ll sometimes find exercises in the middle of a chapter after learning about some topic. These are optional but generally easy to complete. Like the challenges, they’ll help you solidify what you’re learning.

Challenges

Challenges are an important part of Dart Apprentice: Beyond the Basics. At the end of each chapter, the book will give you one or more tasks to accomplish that make use of the knowledge you learned in the chapter. Completing them will not only help you reinforce that knowledge but will also show that you’ve mastered it.

How to Read This Book

Most of the chapters in this book build on the ones that precede it, so you’ll find it easiest to understand if you progress through the chapters in order.

For readers coming from Dart Apprentice: Fundamentals, you’ll learn the most by following along and trying each of the code examples, exercises and challenges as you come to them. The way to learn to code is by writing code and experimenting with it. That can’t be emphasized enough.

More advanced readers may want to skim the content of this book to get up and running quickly. If that’s you, try the challenges at the end of every chapter. If they’re easy, move on to the next chapter. If they’re not, go back and read the relevant parts of the chapter and check the challenge solutions.

Finally, for all readers, Kodeco is committed to providing quality, up-to-date learning materials. We’d love to have your feedback. What parts of the book gave you one of those aha learning moments? Was some topic confusing? Did you spot a typo or an error? Let us know at forums.kodeco.com and look for the particular forum category for this book. We’ll make an effort to take your comments into account in the next update of the book.

Have a technical question? Want to report a bug? You can ask questions and report bugs to the book authors in our official book forum here.
© 2024 Kodeco Inc.