Chapter 5. Understanding libraries and privacy

This chapter covers

  • Organizing your code into reusable packages
  • Importing libraries into your application
  • Hiding functionality with library privacy
  • Using multiple source files
  • Using scripts as runnable libraries

Most programming languages have a library structure that allows code to be split over multiple files and published to other developers, which promotes modularity and code reuse and improves the ability of developers to work on different parts of the same codebase by hiding the internal implementation of a library. Dart is no exception; but in Dart, the library mechanism also has a big impact on privacy, especially class and function privacy. In languages such as Java and C#, privacy ...

Get Dart in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.