Book Image

Learning Dart

Book Image

Learning Dart

Overview of this book

Table of Contents (19 chapters)
Learning Dart
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 2. Getting to Work with Dart

In this chapter you will get a firm grasp on how to program in Dart. The code and data structures in Dart and its functional principles are explained by exploring practical examples. We will look at the following topics:

  • Variables – if, how, and when to type them

  • What are the basic types that you can use?

  • Documenting your programs

  • How to influence the order of execution of a program

  • Using functions in Dart

  • How to recognize and catch errors and exceptions?

You will see plenty of examples, also revisiting the code from Chapter 1, Dart – A Modern Web Programming Language. Because most of this will be familiar to you, we will discuss these topics succinctly and emphasize only that which is new or different. You can refer to http://www.dartlang.org/docs/dart-up-and-running/contents/ch02.html if you need more detailed explanations. We encourage you to play with the code examples, the best way to become familiar with Dart. The full API reference documentation is available...