Pond

Pond

Pond is a fundamental module in the Flood toolkit that aims to organize your code into manageable components and contexts. It provides a structured approach to defining and registering components, handling their lifecycle, and facilitating communication between them. By leveraging Pond, you can break down your application into smaller, reusable pieces, making it easier to maintain and scale your codebase.

Contexts

Pond introduces the concept of contexts, which are essential for managing and organizing components within your application. There are three main types of contexts in Pond:

  • CorePondContext: The CorePondContext is the foundation of Pond and is responsible for managing CorePondComponents. It provides a basic structure for defining and registering components, as well as handling their lifecycle.
  • AppPondContext: The AppPondContext extends the functionality of Pond to the application level. It manages AppPondComponents, which are specifically designed to work with Flutter applications. AppPondComponents can wrap pages, define routes, and handle navigation within your app.
  • AutomatePondContext: The AutomatePondContext is used to manage components related to the Automate Module. It handles the registration and execution of CLI automations within your Flood project.

Both the AppPondContext and AutomatePondContext build upon the CorePondContext, leveraging its core functionality to provide additional capabilities specific to their respective domains.

Pond Contexts Diagram