The Flutter
Micro-framework
For Modern Apps

A solid foundation for building Flutter apps.

Get Started!

Develop your next Flutter app with Nylo

Nylo is a powerful framework for developing mobile apps in Flutter. Out the box it comes with a router, secure storage, networking and more.

Download
Showcase projects built using Nylo

Powerful tools for creating

Everything you need to build your next Flutter app

  • Routing
  • Authentication
  • Forms
  • State Management
  • Events
  • Scheduler
routes/router.dart
appRouter() => nyRoutes((router) {
    router.route(HomePage.path, (context) => HomePage(), initialRoute: true);

    router.route(DiscoverPage.path, (context) => DiscoverPage());

    router.route(LoginPage.path, (context) => LoginPage());

    router.route(ProfilePage.path, (context) => ProfilePage(),
        routeGuard: [
            AuthGuard()
        ]
    );
});

Build complex routes, interfaces and UI pages for your Flutter application.

Learn more

Authenticate a user

User user = User();

await Auth.set(user);

Now, when your user opens the app they will be authenticated.

User? user = await Auth.user<User>();

bool isAuthenticated = await Auth.loggedIn();

Logout the user

await Auth.logout();

Authenticate users in your Flutter application.

Learn more
Step 1

Create a Form

terminal
metro make:form RegisterForm
Step 2

Modify your form

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

    RegisterForm({String? name}) : super(name ?? "login");

    // Add your fields here
    @override
    fields() => [
        Field("Name",
            cast: FormCast.capitalizeWords(),
            validator: FormValidator.rule("not_empty")
        ),
        Field("Email",
            cast: FormCast.email(),
            validator: FormValidator.email()
        ),
        Field("Password",
            cast: FormCast.password(),
            validator: FormValidator.password()
        ),
    ];
}
Step 3

Use your form in a widget

app/forms/register_form.dart
AdvertForm form = AdvertForm();

@override
Widget build(BuildContext context) {
  return Scaffold(
    body: ListView(
      shrinkWrap: true,
      children: [
        NyForm(form: form),

        MaterialButton(child: Text("Submit"),
          onPressed: () {
            form.submit(onSuccess: (data) {
                print(data);
                // {
                //    "Name": "John Doe",
                //    "Email": "example@mail.com",
                //    "Password": "Password1"
                // }
            });
         })
      ],
    ),
  );
}

Manage, validate and submit data all in one place with Nylo Forms.

Learn more

Create a state managed widget

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

    String? _cartValue;

    @override
    void stateUpdated(data) {
        _cartValue = data;
        // data is passed from the updateState method
        setState(() {});
    }

    @override
    Widget build(BuildContext context) {
        return Badge(
            child: Icon(Icons.shopping_cart),
            label: Text(_cartValue ?? "1"),
        );
    }
}

Now, you can update this widget from anywhere in your application

Use the updateState method like in the below code snippet

another widget
MaterialButton(child: Text("Add to cart"),
    onPressed: () {
      updateState(CartIcon.state, data: "2");
    }
)

You can pass any object to the widget

Powerful state management for widgets in your Flutter application.

Learn more
Step 1

Create your event

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
        );
    }
}
Step 2

Dispatch the event

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

Dispatch events and listen for them in your application.

Learn more

Schedule a task to run once

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

Schedule a task to run once after a specific date

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

Schedule a task to run once daily

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

Schedule tasks to run once or daily in your Flutter application.

Learn more
Make things from the terminal

We have built a cli tool called Metro, you can create almost anything on the fly.

Learn more
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

Effortless API Networking

Networking class that makes writing API Services a breeze.

Learn more
class ApiService extends NyApiService {

    @override
    String get baseUrl => "api.example.com/v1";

    Future userInfo() async {
        return await network(
            request: (request) => request.get("/user"),
        );
    }
}

...

class _HomePageState extends NyState<HomePage> {

@override
init() async {
    User user = await api<ApiService>((request) => request.userInfo());
}

Nylo's Community

Together, we can build better Flutter apps.

“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!! I mean, look at this: https://nylo.dev Definitely gonna explore it!”

@esfoliante_txt

“Really love the concept of this framework”

@Chrisvidal

“Just discovered http://nylo.dev and looking forward using in production.”

@medilox

“Nice Framework”

@ChadereNyore

"Nylo" is the best framework for flutter, which make it developing easy such as, file-structure, routing, state, color theme and so on.

@higakijin

This is incredible. Very well done!

FireflyDaniel

Big support and love from morocco <3

@imlian

Very nice Framework! Thank you so much!

@ChaoChao2509

I just discover this framework and i'm verry impressed. Thank you

@lepresk

Great work on Nylo

@dylandamsma