September 2019
Beginner
512 pages
12h 52m
English
In Chapter 1, An Introduction to Dart, in the Functions section, we imported the meta library to use the @required annotation on some parameters. Now, let's explore the import statement in more detail.
To define a library, we simply create a Dart file with some code in it.
In this example, we defined a simple library with the Person, Student, and Employee classes alongside the PersonType enum:
// person_lib library - the Classes contents were truncated for brevity class Person { String firstName; String lastName; PersonType type; Person([this.firstName, ...Read now
Unlock full access