flutter_workspaces_cli 1.1.1
flutter_workspaces_cli: ^1.1.1 copied to clipboard
A command-line tool for scaffolding and managing monorepo-style Flutter workspace structures.
Flutter Workspaces CLI Example #
This example demonstrates how to use the flutter_workspaces_cli to scaffold a new monorepo project.
1. Installation #
First, install the CLI globally using Dart:
dart pub global activate flutter_workspaces_cli
2. Create a Workspace #
Run the CLI with the --name argument to generate your workspace. For this example, we'll create a project named my_demo_app.
flutter_workspaces_cli --name my_demo_app
3. Resulting Structure #
The command creates a folder named my_demo_app_workspaces with the following structure:
my_demo_app_workspaces/
├── pubspec.yaml # Root workspace configuration
├── packages/
│ └── core/ # Shared code package
└── my_demo_app/ # Main Flutter application
4. Running the Project #
Navigate to the new workspace and run the app:
cd my_demo_app_workspaces
flutter pub get
cd my_demo_app
flutter run