Search packages, repositories and app categories

Package detailsv2.0.1

nuvigator

A powerful routing abstraction over Flutter navigator, providing some new features and an easy way to define routers.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
49.4K
Likes
50
Pub points
140

Install package

flutter pub add nuvigator

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Nuvigator is a routing abstraction for Flutter that enhances the built-in Navigator with additional features and a simplified, declarative way to define navigation routes. It provides a clean, scalable approach to managing app navigation across multiple platforms, including Android, iOS, Web, macOS, Windows, and Linux. By offering a structured router configuration and improved navigation handling, Nuvigator helps developers build complex navigation flows with less boilerplate and greater maintainability.

Use cases

  • Complex navigation flows
  • Cross-platform navigation
  • Modular app architecture
  • Easy route management
  • Navigation state persistence

Key features

  • Declarative route definitions
  • Multi-platform support
  • Navigation state management
  • Extensible router system
  • Clean separation of concerns

Suitable for

  • Large-scale Flutter applications
  • Teams needing consistent navigation patterns
  • Apps requiring advanced routing logic
  • Developers seeking reduced navigation boilerplate
  • Projects targeting multiple platforms

Considerations

  • Learning curve for new users
  • Potential overhead in simple apps
  • Requires understanding of routing concepts
  • Limited community adoption compared to native Navigator
  • May need custom setup for advanced use cases

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Nuvigator

CircleCI Pub

Routing and Navigation package.

Não fala bem inglês? Leia o README_PT

What

Nuvigator provides a powerful routing abstraction over Flutter's own Navigators. Model complex navigation flows using a mostly declarative and concise approach, without needing to worry about several tricky behaviors that Nuvigator handles for you.

Nuvigator can help you with:

  • Large/Modular Apps: Where you need to have an unified API to able to register routes and design relationship between them
  • Nested Navigation: When you want to have nested/children Navigator inside your app, creating the concept of self contained flows
    • Handles Navigation thought Nuvigator ins your Widget Tree, not need to know where your route is declared
    • Handles pop behavior when a nested Navigator reaches it's end, is able to transparently forward pop results into underlying caller, provider helpers to deal with nested navigation
    • Handles Hero animation/transition between nested Navigators
    • Handles Android back button correctly on nested Navigators
    • Improve support for nested PageRoutes with NuvigatorPageRoute mixin
  • Using DeepLinks: You want to navigate inside your App using DeepLinks, with support for Path Parameters and Query Parameters
  • A declarative, easy to use API to declare and compose Routes together

API Documentation

Focus on providing a more flexible, easier and dynamic API for declaring Navigation and Routing

Quick Start

The simplest you can get:

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Nuvigator App',
      builder: Nuvigator.routes(
        initialRoute: 'home',
        screenType: materialScreenType,
        routes: [
          NuRouteBuilder(path: 'home', builder: (_, __, ___) => HomeScreen()),
          NuRouteBuilder(path: 'second', builder: (_, __, ___) => SecondScreen()),
        ],
      ),
    );
  }
}

A more complete example:

import 'package:nuvigator/next.dart'; // import the next file instead of `nuvigator.dart`
import 'package:flutter/material.dart';

// Define a new NuRoute
class MyRoute extends NuRoute {
  @override
  String get path => 'my-route';

  @override
  ScreenType get screenType => materialScreenType;

  @override
  Widget build(BuildContext context, NuRouteSettings settings) {
    return MyScreen(
      onClick: () => nuvigator.open('next-route'),
    );
  }
}

// Define your NuRouter
class MyRouter extends NuRouter {
  @override
  String get initialRoute => 'my-route';

  @override
  List<NuRoute> get registerRoutes => [
    MyRoute(),
  ];
}

// Render
Widget build(BuildContext context) {
  return Nuvigator(
    router: MyRouter(),
  );
}

License

Apache License 2.0

Categories

Dependencies

Dependency list 3 items

Source repository

Projects using this package

No data available yet.