🎉 Nylo v7 is here! See what's new →

Nylo v7

A leap forward in Flutter development

Building Flutter apps should feel intuitive, not overwhelming. Nylo v7 brings a cleaner architecture, encrypted environment variables, and a streamlined developer experience that lets you focus on what matters: your app.

What is Nylo?

Nylo is a micro-framework for Flutter that provides structure and conventions for building mobile apps. Think of it as the missing architecture layer for Flutter — it handles routing, state management, API networking, theming, and localization so you can build production-ready apps without reinventing the wheel.

If you've ever felt lost deciding how to organize a Flutter project, Nylo gives you a clear path forward.

Security First: Encrypted Environment Variables

One of the biggest changes in v7 is how environment variables are handled. Previously, sensitive values like API keys sat in plain text. Now, Nylo encrypts your environment at build time using XOR encryption.

Getting started is simple:

# Generate your encryption key
metro make:key

# Encrypt your environment variables
metro make:env

This generates a secure env.g.dart file. Your API keys, secrets, and configuration are now protected — and it works seamlessly with CI/CD pipelines through --dart-define.

One Method to Configure Everything

App configuration used to require multiple method calls scattered across your provider. Now, nylo.configure() consolidates everything into a single, readable block.

await nylo.configure(
  localization: NyLocalizationConfig(
    languageCode: 'en',
    assetsDirectory: 'assets/lang',
  ),
  themes: appThemes,
  initialThemeId: 'light_theme',
  modelDecoders: modelDecoders,
  controllers: controllers,
  apiDecoders: apiDecoders,
  useErrorStack: true,
);

Everything your app needs is defined in one place. No more hunting through multiple files to understand your app's setup.

Multi-Theme Support

Dark mode is expected in modern apps, but what about offering multiple light or dark theme variants? Nylo v7 makes this straightforward.

final List<BaseThemeConfig<ColorStyles>> appThemes = [
  BaseThemeConfig<ColorStyles>(
    id: 'light_theme',
    theme: lightTheme,
    colors: LightThemeColors(),
    type: NyThemeType.light,
  ),
  BaseThemeConfig<ColorStyles>(
    id: 'dark_theme',
    theme: darkTheme,
    colors: DarkThemeColors(),
    type: NyThemeType.dark,
  ),
  BaseThemeConfig<ColorStyles>(
    id: 'midnight_theme',
    theme: midnightTheme,
    colors: MidnightThemeColors(),
    type: NyThemeType.dark,
  ),
];

Users can pick their preferred theme, and your app remembers their choice. The new API makes theme switching and enumeration simple:

// Switch themes
NyTheme.set(context, id: 'midnight_theme');

// Get all available dark themes
List<BaseThemeConfig> darkOptions = NyTheme.darkThemes();

// Let the system decide, with preferred fallbacks
NyTheme.setPreferredDark('midnight_theme');
NyTheme.setPreferredLight('light_theme');

Consistent Loading States

Loading indicators should be consistent across your app. The new LoadingStyle system provides three options out of the box:

// Standard loading indicator
loadingStyle: LoadingStyle.normal()

// Skeleton loading effect
loadingStyle: LoadingStyle.skeletonizer()

// No loading indicator
loadingStyle: LoadingStyle.none()

// Custom loading widget
loadingStyle: LoadingStyle.normal(child: MyCustomLoader())

Refreshed Widget Library

Several widgets have been renamed for clarity and given improved APIs:

Here's CollectionView with pull-to-refresh pagination:

CollectionView<User>.pullable(
  data: (page) async => await api.getUsers(page: page),
  builder: (context, item) => ListTile(
    title: Text(item.data.name),
  ),
)

New Metro Commands

The Metro CLI continues to grow. New commands in v7 include:

Ready to Try Nylo?

Getting started with Nylo v7 takes just a few commands:

# Install the Nylo CLI globally
dart pub global activate nylo_installer

# Create a new project
nylo new my_app

# Set up Metro CLI
cd my_app
nylo init

# Run the app
flutter run

That's it. The installer configures everything automatically — routing, API services, theming, localization, and the Metro CLI for code generation.

Migrating from v6? Our Upgrade Guide walks you through every change with before/after examples.