パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v2.0.1

nuvigator

Flutterナビゲーター上の強力なルーティング抽象化で、いくつかの新しい機能を提供し、ルーターを簡単に定義できるようにします。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
4.9万
いいね数
50
Pub ポイント
140

パッケージをインストール

flutter pub add nuvigator

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

Nuvigator は、Flutter の組み込み Navigator を拡張し、追加機能と簡潔で宣言的な方法でナビゲーションルートを定義するためのルーティング抽象です。Android、iOS、Web、macOS、Windows、Linux など、複数のプラットフォームでアプリのナビゲーションを管理するための明確かつスケーラブルなアプローチを提供します。構造化されたルーター設定と改善されたナビゲーション処理により、Nuvigator は開発者が少ないボイラープレートコードと高い保守性で複雑なナビゲーションフローを構築できるように支援します。

用途

  • 複雑なナビゲーションフロー
  • クロスプラットフォームナビゲーション
  • モジュラーアプリケーションアーキテクチャ
  • 簡単なルート管理
  • ナビゲーション状態の永続化

主な機能

  • 宣言型ルート定義
  • マルチプラットフォーム対応
  • ナビゲーション状態の管理
  • 拡張可能なルーター システム
  • 関心事の明確な分離

適している対象

  • 大規模なFlutterアプリケーション
  • 一貫したナビゲーションパターンを必要とするチーム
  • 高度なルーティング論理を必要とするアプリ
  • ナビゲーションのボイラープレートを減らしたい開発者
  • 複数のプラットフォームをターゲットにするプロジェクト

注意事項

  • 新規ユーザー向けの学習曲線
  • シンプルなアプリにおける潜在的なオーバーヘッド
  • ルーティングのコンセプトを理解する必要があります
  • ネイティブなナビゲーターと比べてコミュニティでの採用は限定的
  • 高度な使用ケースにはカスタム設定が必要になる場合があります

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

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

カテゴリー

依存関係

依存関係一覧 3 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。