Installation
To get started with Air Framework, the recommended path is to install the CLI first. It automates package management, project scaffolding, and code generation.
1. Install Air CLI
Section titled “1. Install Air CLI”The Air CLI is the core tool for building with Air Framework. Activate it globally using Dart:
dart pub global activate air_cliVerify Installation
Section titled “Verify Installation”Run the following command to ensure the CLI is ready:
air doctor2. Start a New Project
Section titled “2. Start a New Project”The easiest way to initialize a project with all dependencies correctly configured is using the CLI:
air create my_appcd my_appThis command automatically adds air_framework, air_generator, and necessary dev dependencies to your project.
3. Manual Installation
Section titled “3. Manual Installation”If you prefer to add Air Framework to an existing project manually:
Add Dependencies
Section titled “Add Dependencies”Add air_framework to your pubspec.yaml:
dependencies: air_framework: any # latest versionFor reactive state management and code generation, add these to your dev_dependencies:
dev_dependencies: air_generator: any # latest version build_runner: any # latest version