fast_nav 0.4.1 copy "fast_nav: ^0.4.1" to clipboard
fast_nav: ^0.4.1 copied to clipboard

Navigate without context. Call navigation methods from your business logic.

Navigate without context

pub package codecov checks popularity likes pub points

Features #

fast_nav supports the following navigation methods:

  • pop
  • canPop
  • push
  • pushReplacement
  • pushAndRemoveUntil
  • pushAndRemoveAll
  • pushNamed
  • pushReplacementNamed
  • pushNamedAndRemoveUntil
  • pushNamedAndRemoveAll

Convenience features:

  • Nested navigation with a NestedNavigator class for simple setup

Getting started #

Register a GlobalKey with FastNav and your MaterialApp

import 'package:fast_nav/fast_nav.dart';
import 'package:flutter/material.dart';

void example() {
  MaterialApp(
    navigatorKey: FastNav.init(),
  );
}

Usage #

import 'package:fast_nav/fast_nav.dart';
import 'package:flutter/material.dart';

void example(BuildContext context) {
  context.push(const Text('Navigate with context'));
  FastNav.push(const Text('or without'));
}

import 'package:fast_nav/fast_nav.dart';
import 'package:flutter/material.dart';

void example() {
  // ...

  NestedNavigator(
    name: 'nestedNavigator',
    home: const Text('home'),
  );

  // ...

  FastNav.push(const Text('New page'), navigator: 'nestedNavigator');
}

Additional information #

See fast_ui for more information

0
likes
140
pub points
25%
popularity

Publisher

verified publisherrexios.dev

Navigate without context. Call navigation methods from your business logic.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on fast_nav