Installation
Get started with fluttercn in your Flutter project
Installation
Get fluttercn up and running in your Flutter project in just a few steps.
Prerequisites
Before you begin, make sure you have:
- Node.js (v14 or higher) - for the CLI tool
- Flutter SDK - installed and configured on your machine
- A Flutter project - or create a new one
Step 1: Install the CLI
Install fluttercn CLI globally using npm:
npm install -g fluttercnOr using yarn:
yarn global add fluttercnStep 2: Initialize Your Project
Navigate to your Flutter project directory and initialize fluttercn:
cd your-flutter-project
fluttercn initThis command will:
- Validate that you're in a Flutter project
- Create the theme configuration file at
lib/config/theme.dart - Set up the necessary structure for components
Note: You only need to run this once per project. If fluttercn is already initialized, you'll see a warning message.
Step 3: Add Your First Component
Now you're ready to add components! First, let's see what's available:
fluttercn listOr use the short alias:
fluttercn lsThen add a component to your project:
fluttercn add buttonOr add multiple components:
fluttercn add card
fluttercn add buttonThe components will be copied to lib/widgets/common/ in your project, and you can start using them right away!
What's Next?
- Browse all available components
- Learn about theming your components
- Check out component examples and usage patterns