concept dynamic type in category dart

appears as: dynamic type, The dynamic type, dynamic types
Dart in Action

This is an excerpt from Manning's book Dart in Action.

The dynamic type is similar in concept to the Object type, in that every type “is-a” dynamic type. As such, you can use the dynamic type annotation in variable and parameter declarations and as function return types. In terms of the language, specifying the dynamic type is the same as providing no type information; but when you do specify the dynamic type, you let other developers know that you made a decision for the dynamic type to be used rather than just not specifying it. We’ll look at this in more detail later in the chapter. First, figure 7.11 shows how dynamic is used automatically when you don’t provide other type information: the dynamic type is used on the left, and an explicit type, such as String, is used on the right.

Figure 7.11. Illustration of where Dart implies the dynamic type, compared with the equivalent strong typing
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest