🎉 Nylo v7 è qui! Scopri le novità →

Il Flutter
Micro-framework
Per App Moderne

Una solida base per costruire app Flutter. Routing, gestione dello stato, networking e altro — tutto in un elegante pacchetto.

Inizia
Esplora
Metro CLI

Crea qualsiasi cosa dal terminale

Metro è lo strumento CLI di Nylo che ti aiuta a creare scaffold di pagine, modelli, controller, widget e altro con un singolo comando.

Scopri di più su Metro
metro make:page HomePage
# Creates a new page called HomePage

metro make:api_service User
# Creates a new API Service called UserApiService

metro make:model User
# Creates a new model called User

metro make:stateful_widget FavouriteWidget
# Creates a new stateful widget called FavouriteWidget
class ApiService extends NyApiService {
  @override
  String get baseUrl => "https://api.example.com/v1";

  Future<List<Post>> posts() async {
    return await network(
      request: (request) => request.get("/posts"),
    );
  }
}

// Usage in your page
final posts = await api<ApiService>((request) => request.posts());
Networking

Integrazione API senza sforzo

Scrivi servizi API puliti e mantenibili con parsing JSON automatico, gestione errori e interceptor delle richieste.

Scopri di più sul Networking
Esplora

Strumenti potenti per creare

Tutto ciò di cui hai bisogno per costruire la tua prossima app Flutter

routes/router.dart
appRouter() => nyRoutes((router) {
    router.add(HomePage.path).initialRoute();

    router.add(DiscoverPage.path);

    router.add(LoginPage.path, 
        transitionType: TransitionType.bottomToTop());

    router.add(ProfilePage.path,
        routeGuard: [
            AuthGuard()
        ]
    );
});

Crea percorsi complessi, interfacce e pagine UI per la tua applicazione Flutter.

Scopri di più
Passo 1

Autenticare un utente

String userToken = "eyJhbG123...";

await Auth.authenticate(data: {"token": userToken});
Passo 2

Ora, quando l'utente apre l'app sarà autenticato.

final userData = Auth.data();
// {"token": "eyJhbG123..."}

bool isAuthenticated = await Auth.isAuthenticated();
// true
Passo 3

Se hai impostato un authenticatedRoute nel tuo router, questa pagina verrà presentata quando l'utente aprirà di nuovo l'app.

routes/router.dart
appRouter() => nyRoutes((router) {
    ...
    router.add(LandingPage.path).initialRoute();

    router.add(DashboardPage.path).authenticatedRoute();
    // overrides the initial route when a user is authenticated

Disconnetti l'utente

await Auth.logout();

Autentica gli utenti nella tua applicazione Flutter.

Scopri di più
Passo 1

Crea un modulo

terminal
metro make:form RegisterForm
Passo 2

Modifica il tuo modulo

app/forms/register_form.dart
class RegisterForm extends NyFormWidget {

    RegisterForm({super.key, super.submitButton, super.onSubmit, super.onFailure});

    // Add your fields here
    @override
    fields() => [
        Field.capitalizeWords("name",
            label: "Name",
            validator: FormValidator.notEmpty(),
        ),
        Field.email("email_address",
            label: "Email",
            validator: FormValidator.email()
        ),
        Field.password("password",
            label: "Password",
            validator: FormValidator.password(),
        ),
    ];

    static NyFormActions get actions => const NyFormActions("RegisterForm");
}
Passo 3

Usa il tuo modulo in un widget

register_page.dart
@override
Widget build(BuildContext context) {
  return Scaffold(
    body: RegisterForm(
      submitButton: Button.primary(text: "Submit"),
      onSubmit: (data) {
        printInfo(data);
      },
    ),
  );
}

Gestisci, valida e invia dati in un unico posto con Nylo Forms.

Scopri di più
Passo 1

Crea un widget gestito dallo stato

terminal
metro make:stateful_widget CartIcon
resources/cart_icon_widget.dart
class _CartIconState extends NyState<CartIcon> {
  ...

  @override
  Map<String, Function> get stateActions => {
    "clear_cart": () {
      _items = 0;
    },
    ...
  };

  @override
  Widget view(BuildContext context) {
    return Container(child: Text("Items in cart: ${_items}"));
  }
}
Passo 2

Use CartIcon.action("clear_cart")

another widget
Button.primary(text: "Add to cart",
    onPressed: () {
      CartIcon.action("clear_cart");
    }
)

Gestione dello stato potente per i widget nella tua applicazione Flutter.

Scopri di più
Passo 1

Crea il tuo evento

terminal
metro make:event Logout
app/events/logout_event.dart
class LogoutEvent implements NyEvent {
    @override
    final listeners = {
        DefaultListener: DefaultListener(),
    };
}

class DefaultListener extends NyListener {
    @override
    handle(dynamic event) async {

        // logout user
        await Auth.logout();

        // redirect to home page
        routeTo(HomePage.path,
            navigationType: NavigationType.pushAndForgetAll
        );
    }
}
Passo 2

Invia l'evento

MaterialButton(child: Text("Logout"),
    onPressed: () {
        event<LogoutEvent>();
    },
)

Invia eventi e ascoltali nella tua applicazione.

Scopri di più

Pianifica un'attività da eseguire una volta

Nylo.scheduleOnce("onboarding_info", () {
    print("Perform code here to run once");
});

Pianifica un'attività da eseguire una volta dopo una data specifica

Nylo.scheduleOnceAfterDate("app_review_rating", () {
    print("Perform code to run once after DateTime(2025, 04, 10)");
}, date: DateTime(2025, 04, 10));

Pianifica un'attività da eseguire una volta al giorno

Nylo.scheduleOnceDaily("free_daily_coins", () {
    print("Perform code to run once daily");
});

Pianifica attività da eseguire una volta o quotidianamente nella tua applicazione Flutter.

Scopri di più
Passo 1

Crea un servizio API

terminal
metro make:api_service User
app/networking/user_api_service.dart
class UserApiService extends NyApiService {
    @override
    String get baseUrl => getEnv("API_BASE_URL");

    Future<User?> fetchUser(int id) async {
        return await get<User>(
            "/users/$id",
            queryParameters: {"include": "profile"},
        );
    }

    Future<User?> createUser(Map<String, dynamic> data) async {
        return await post<User>("/users", data: data);
    }
}
Passo 2

Chiama l'API dalla tua pagina

User? user = await api<UserApiService>(
    (request) => request.fetchUser(1),
);

Servizi API eleganti con parsing JSON automatico, caching e interceptor.

Scopri di più
Passo 1

Salva i dati in modo sicuro

saving_data.dart
// Save values to secure storage
await NyStorage.save("coins", 100);
await NyStorage.save("username", "Anthony");
await NyStorage.save("isPremium", true);

// Save with TTL (auto-expires)
await NyStorage.save("session", "abc123",
    expiry: Duration(hours: 1),
);
Passo 2

Leggi con conversione di tipo

// Automatic type casting
String? username = await NyStorage.read("username");
int? coins = await NyStorage.read<int>("coins");
bool? isPremium = await NyStorage.read<bool>("isPremium");

// Delete a value
await NyStorage.delete("coins");

Archiviazione locale sicura con conversione di tipo, scadenza TTL e collezioni.

Scopri di più
Passo 1

Aggiungi i tuoi file di lingua

lang/en.json
{
    "welcome": "Welcome",
    "greeting": "Hello {{name}}",
    "navigation": {
        "home": "Home",
        "profile": "Profile"
    }
}
Passo 2

Traduci il testo nei tuoi widget

// Simple translation
Text("welcome".tr())  // "Welcome"

// With arguments
Text("greeting".tr(arguments: {"name": "Anthony"}))
// "Hello Anthony"

// Nested keys
Text("navigation.home".tr())  // "Home"

Supporto multilingue con file JSON, argomenti e RTL.

Scopri di più
Passo 1

Crea un hub di navigazione

terminal
metro make:navigation_hub base
resources/pages/base_navigation_hub.dart
class _BaseNavigationHubState extends NavigationHub<BaseNavigationHub> {

    NavigationHubLayout? layout = NavigationHubLayout.bottomNav();

    @override
    bool get maintainState => true;

    _BaseNavigationHubState() : super(() async {
        return {
            0: NavigationTab(
                title: "Home",
                page: HomeTab(),
                icon: Icon(Icons.home),
            ),
            1: NavigationTab(
                title: "Settings",
                page: SettingsTab(),
                icon: Icon(Icons.settings),
            ),
        };
    });
}
Passo 2

Cambia layout facilmente

// Bottom navigation
NavigationHubLayout.bottomNav()

// Top navigation
NavigationHubLayout.topNav()

// Journey / wizard flow
NavigationHubLayout.journey()

Crea navigazione inferiore, superiore o flussi di percorso con mantenimento dello stato.

Scopri di più

Amato dalla community

Cosa dicono gli sviluppatori su Nylo Website

Unisciti alla discussione

I'm new to Dart and new to your framework (which I love)

Peter Senior Director of Heroku Global

I wanted to thank you guys for the great job you are doing.

@youssefKadaouiAbbassi

Just to say that I am in love with @nylo_dev's website!! Definitely gonna explore it!

@esfoliante_txt

Really love the concept of this framework

@Chrisvidal

Nylo is the best framework for flutter, which makes developing easy

@higakijin

This is incredible. Very well done!

FireflyDaniel

Very nice Framework! Thank you so much!

@ChaoChao2509

I just discovered this framework and I'm very impressed. Thank you

@lepresk

Great work on Nylo

@dylandamsma

This is by far the best framework out there. Amazing quality and features. Thanks so much.

@2kulfi

It's interesting and very amazing. It makes the work more easier and less time consuming. Great work. Thank you

darkreader01

Salut. Je viens juste de découvrir votre outils et je le trouve vraiment super. Une belle découverte pour moi 👌🤌

ojean-01