-
Notifications
You must be signed in to change notification settings - Fork 1
Plugins and Packages repository structure
This provides an overview of the structure of the flutter/plugins and flutter/packages repository.
flutter/plugins uses the federated plugin model. If you are not familiar with federated plugins, start with reading the federated plugin overview to understand the terms below.
All plugins are located in the packages/
directory. In theory, each plugin should have the following layout:
-
some_plugin/
- A directory containing the individual packages of the federated plugin:-
some_plugin/
- The app-facing package -
some_plugin_platform_interface/
- The platform interface -
some_plugin_android/
,some_plugin_ios/
,some_plugin_web/
,some_plugin_windows/
,some_plugin_macos/
, and/orsome_plugin_linux/
- The individual platform implementations, as applicable
-
This layout reflects the goal of having all plugins in flutter/plugins being fully federated. (While this is not strictly necessary, as all packages are being maintained by the Flutter team, using a fully federated structure ensures that we are testing the federated model and finding issues and areas for improvement specific to federation.)
In practice (as of May 2021) most plugins are not yet fully federated, and some are not federated at all, since the process of converting them from their pre-federated forms is ongoing. The two most common alternate structures are:
-
some_plugin/
-
some_plugin/
- The app-facing package, also containingios/
andandroid/
folders containing their implementations -
some_plugin_platform_interface/
- The platform interface -
some_plugin_web/
,some_plugin_windows/
,some_plugin_macos/
, and/orsome_plugin_linux/
- Federated implementations
-
These are packages that have mobile implementations that predate the federated model, but have had a platform implementation extracted to add new platforms via federation. Eventually the ios/
and android/
implementations will be extracted to their own packages.
-
some_plugin/
- An unfederated plugin containing mobile implementations
These are packages that predate the federated model and have not had web or desktop implementations added. They should be federated at some point as well, unless extending them to other platforms would never make sense.
script/tool/
contains the tooling used to manage tasks across all plugins in the repository. See its README for more information.
Most packages are located in packages
. A few which are derived heavily from third-party code are instead in third_party/packages/
.
- Home of the Wiki
- Roadmap
- API Reference (stable)
- API Reference (master)
- Glossary
- Contributor Guide
- Chat on Discord
- Code of Conduct
- Issue triage reports
- Our Values
- Tree hygiene
- Issue hygiene and Triage
- Style guide for Flutter repo
- Project teams
- Contributor access
- What should I work on?
- Running and writing tests
- Release process
- Rolling Dart
- Manual Engine Roll with Breaking Commits
- Updating Material Design Fonts & Icons
- Postmortems
- Setting up the Framework development environment
- The Framework architecture
- The flutter tool
- API Docs code block generation
- Running examples
- Using the Dart analyzer
- The flutter run variants
- Test coverage for package:flutter
- Writing a golden-file test for package:flutter
- Setting up the Engine development environment
- Compiling the engine
- Debugging the engine
- Using Sanitizers with the Flutter Engine
- Testing the engine
- The Engine architecture
- Flutter's modes
- Engine disk footprint
- Comparing AOT Snapshot Sizes
- Custom Flutter engine embedders
- Custom Flutter Engine Embedding in AOT Mode
- Flutter engine operation in AOT Mode
- Engine-specific Service Protocol extensions
- Crashes
- Supporting legacy platforms
- Metal on iOS FAQ
- Engine Clang Tidy Linter
- Why we have a separate engine repo
- Reduce Flutter engine size with MLGO
- Setting up the Plugins development environment
- Setting up the Packages development environment
- Plugins and Packages repository structure
- Plugin Tests
- Contributing to Plugins and Packages
- Releasing a Plugin or Package
- Unexpected Plugins and Packages failures