The Flutter
Micro-framework
For Modern Apps
A solid foundation for building Flutter apps. Routing, state management, networking, and more — all in one elegant package.
Everything you need to build
Nylo provides all the tools you need to create production-ready Flutter applications with confidence.
Routing
Simple, declarative routing with route guards, parameters, and deep linking support.
State Management
Built-in reactive state management with controllers and easy state persistence.
Networking
Elegant API service classes with automatic model serialization and interceptors.
Forms
Powerful form handling with validation, casting, and automatic data binding.
Authentication
Secure authentication with route guards, token storage, and session management.
Metro CLI
Generate pages, models, controllers, and more with powerful CLI commands.
Create anything from the terminal
Metro is Nylo's CLI tool that helps you scaffold pages, models, controllers, widgets, and more with a single command.
Learn more about Metrometro 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());
Effortless API integration
Write clean, maintainable API services with automatic JSON parsing, error handling, and request interceptors.
Learn more about NetworkingPowerful tools for creating
Everything you need to build your next Flutter app
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()
]
);
});
Build complex routes, interfaces and UI pages for your Flutter application.
Learn more
Authenticate a user
String userToken = "eyJhbG123...";
await Auth.authenticate(data: {"token": userToken});
Now, when your user opens the app they will be authenticated.
final userData = Auth.data();
// {"token": "eyJhbG123..."}
bool isAuthenticated = await Auth.isAuthenticated();
// true
If you've set an authenticatedRoute in your router, then it will present this page when the user opens the app again.
appRouter() => nyRoutes((router) {
...
router.add(LandingPage.path).initialRoute();
router.add(DashboardPage.path).authenticatedRoute();
// overrides the initial route when a user is authenticated
Logout the user
await Auth.logout();
Authenticate users in your Flutter application.
Learn more
Create a Form
metro make:form RegisterForm
Modify your form
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");
}
Use your form in a widget
@override
Widget build(BuildContext context) {
return Scaffold(
body: RegisterForm(
submitButton: Button.primary(text: "Submit"),
onSubmit: (data) {
printInfo(data);
},
),
);
}
Manage, validate and submit data all in one place with Nylo Forms.
Learn more
Create a state managed widget
metro make:stateful_widget CartIcon
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}"));
}
}
Use CartIcon.action("clear_cart")
Button.primary(text: "Add to cart",
onPressed: () {
CartIcon.action("clear_cart");
}
)
Powerful state management for widgets in your Flutter application.
Learn more
Create your event
metro make:event Logout
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
);
}
}
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
Create an API Service
metro make:api_service User
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);
}
}
Call the API from your page
User? user = await api<UserApiService>(
(request) => request.fetchUser(1),
);
Elegant API services with automatic JSON parsing, caching, and interceptors.
Learn more
Save data securely
// 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),
);
Read with type casting
// 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");
Secure local storage with type casting, TTL expiry, and collections.
Learn more
Add your language files
{
"welcome": "Welcome",
"greeting": "Hello {{name}}",
"navigation": {
"home": "Home",
"profile": "Profile"
}
}
Translate text in your widgets
// Simple translation
Text("welcome".tr()) // "Welcome"
// With arguments
Text("greeting".tr(arguments: {"name": "Anthony"}))
// "Hello Anthony"
// Nested keys
Text("navigation.home".tr()) // "Home"
Multi-language support with JSON files, arguments, and RTL.
Learn more
Create a Navigation Hub
metro make:navigation_hub base
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),
),
};
});
}
Switch layouts easily
// Bottom navigation
NavigationHubLayout.bottomNav()
// Top navigation
NavigationHubLayout.topNav()
// Journey / wizard flow
NavigationHubLayout.journey()
Build bottom nav, top nav, or journey flows with state maintenance.
Learn more
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