CHAPTER 15

image

Working with Functions

In this chapter we’ll talk about functions in Dart: how you can create them, how to define them, and which types of parameters they can receive.

We’ll see in detail the difference between positional arguments and named arguments. We’ll also see default values for the function parameters. Later we’ll see the returned values for functions, and at the end of the chapter we’ll look at recursive functions in Dart. So far, you’ve seen single statements, control statements, and loop structures. With these tools you can start to build an application in Dart, but as the application grows up you will need to organize your ...

Get Web Programming with Dart now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.