In this recipe, you have seen how to create a package comprising multiple files and depend on it using a git repository.
The part and part of keywords allow a library to be split into several files. In the main file, you specify all the other files that make the library, using the part statement. Note the commands:
part 'rectangle.dart';
part 'triangle.dart';
The preceding commands mean that the triangle.dart and rectangle.dart files are parts of the area library. This is also where you put all the import statements, which are visible in each linked file. In the linked files, you also add the part of statement:
part of area;
This means that each file is a part of the area package.
It's now generally recommended that you prefer small libraries (also called mini-packages) that avoid using the part/part of commands, when possible. Still, knowing that you can separate complex code into several files can be useful in certain circumstances...