Generics

The <..> syntax is used to specify the type supported by a collection. If you look at the previous examples of lists and maps, you will notice that we have not specified any type. This is because they are optional, and Dart can infer the type based on elements during the collection initialization. 

Check this chapter's source code on GitHub for examples on collections and generics. Remember, if the Dart analyzer tool cannot infer the type, it assumes the dynamic type.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.44.108