Installation

Get the Dart SDK, Flutter, and the RonakCN CLI installed and ready in four steps.


Prerequisites

RonakCN requires Dart SDK ≥ 3.0 and Flutter ≥ 3.10. Steps 1 and 2 guide you through installing both if you do not have them yet.

1

Install Dart & Flutter

The easiest way to install both Dart and Flutter is via the official Flutter SDK, which bundles Dart. Download the installer for your platform from flutter.dev, then verify the install:

terminal
flutter --version
dart --version

Run flutter doctor to confirm the environment is healthy before continuing.

flutter doctor
2

Activate the CLI

The CLI is distributed as a Dart pub global package. Activate it once and it becomes available everywhere on your machine:

terminal
dart pub global activate ronakcn_cli

Make sure $HOME/.pub-cache/bin (or %APPDATA%\Pub\Cache\bin on Windows) is on your PATH. Verify with:

ronakcn --version
3

Initialise your project

Navigate to the root of your Flutter project and run:

terminal
ronakcn init

This creates a ronakcn.json config file in your project root. The default config looks like this:

ronakcn.json
{
  "version": "1",
  "outputDir": "lib/components",
  "theme": {
    "preset": "default",
    "radius": "md"
  }
}
4

Add components

Use the add command to copy any component into your project:

terminal
ronakcn add button

The CLI copies the widget source to lib/components/button/, installs required pub dependencies, and updates ronakcn.json.

You can then import and use the component:

lib/main.dart
import 'package:my_app/components/button/button.dart';

// Inside a widget build method:
RcnButton(
  label: 'Get started',
  onPressed: () {},
)

Next steps