Getting Started

Installation

Install

1. Install nylo_installer globally

dart pub global activate nylo_installer

This installs the Nylo Website CLI tool globally on your system.

2. Create a new project

nylo new my_app

This command clones the Nylo Website template, configures the project with your app name, and installs all dependencies automatically.

3. Set up Metro CLI alias

cd my_app
nylo init

This configures the metro command for your project, allowing you to use Metro CLI commands without the full dart run syntax.

After installation, you'll have a complete Flutter project structure with:

  • Pre-configured routing and navigation
  • API service boilerplate
  • Theme and localization setup
  • Metro CLI for code generation

Running the Project

Nylo Website projects run like any standard Flutter app.

Using the Terminal

flutter run

Using an IDE

If the build is successful, the app will display Nylo Website's default landing screen.

Metro CLI

Nylo Website includes a CLI tool called Metro for generating project files.

Running Metro

metro

This displays the Metro menu:

Metro - Nylo's Companion to Build Flutter apps by Anthony Gordon

Usage:
    command [options] [arguments]

Options
    -h

All commands:

[Widget Commands]
  make:page
  make:stateful_widget
  make:stateless_widget
  make:state_managed_widget
  make:navigation_hub
  make:journey_widget
  make:bottom_sheet_modal
  make:button
  make:form

[Helper Commands]
  make:model
  make:provider
  make:api_service
  make:controller
  make:event
  make:theme
  make:route_guard
  make:config
  make:interceptor
  make:command
  make:env

Metro Commands Reference

Command Description
make:page Create a new page
make:stateful_widget Create a stateful widget
make:stateless_widget Create a stateless widget
make:state_managed_widget Create a state-managed widget
make:navigation_hub Create a navigation hub (bottom nav)
make:journey_widget Create a journey widget for navigation hub
make:bottom_sheet_modal Create a bottom sheet modal
make:button Create a custom button widget
make:form Create a form with validation
make:model Create a model class
make:provider Create a provider
make:api_service Create an API service
make:controller Create a controller
make:event Create an event
make:theme Create a theme
make:route_guard Create a route guard
make:config Create a config file
make:interceptor Create a network interceptor
make:command Create a custom Metro command
make:env Generate environment config from .env

Example Usage

# Create a new page
metro make:page settings_page

# Create a model
metro make:model User

# Create an API service
metro make:api_service user_api_service