concept dynamic source file in category dart

This is an excerpt from Manning's book Dart in Action.
Now you have a fileList variable, which, for example, could contain a list of filenames in the c:\windows folder, and a dynamicSourceFiles list, which could contain the filenames fileSize.dart and fileTypes.dart. Each of the dynamic source files, which the running application doesn’t know about in advance, must be loaded into an isolate and have some data passed into it. This is similar to the spawnFunction() function, except that to dynamically load code from an external file, you use the spawnUri() function, passing in a URI or filename to load, such as spawnUri("fileTypes.dart");.
You can update the analyzeFileList() function to iterate through the list of dynamic source files, spawning an isolate from each one in turn and passing the fileList data into it. The default isolate (the DirAnalysis.dart application) will wait until it has received the same number of replies as there are source files before closing its port. The next listing shows the new analyzeFileList() function to perform this task.
When you load a Dart application, it has main(), which returns void and takes no parameters. This is the entry-point function for the main isolate. When you load an isolate dynamically from a source file, main() is also the entry-point function that begins executing in a new isolate. This means any source files that are loaded dynamically need to define a main() function, the same as a Dart script. This makes sense, because each Dart script runs in its own isolate, including the default isolate; internally, the default isolate and dynamically loaded isolate use the same mechanism. Figure 15.9 shows the outline of the default isolate and the dynamic source files.