flutter_navigation 0.0.2

  • README.md
  • Installing
  • Versions
  • new37


Life is short, use Flutter Navigation

a flutter navigation solution

currently support cupertino app

First, add flutter_navigation as a dependency in your pubspec.yaml file.


    import "package:flutter_navigation/navigation.dart";
    import 'some_widget_1.dart'
    import 'some_widget_2.dart'

    final screens ={
    final navigationOptions ={
              "SomeWidget1":NavigationOptions(title:Text('Widget Title')),
              "SomeWidget2":NavigationOptions(title:Text('Widget Title')),

void main(){

    return runApp(FlutterNavigation(
            onUnknownRoute:Route (FlutterNavigator navigation){
                return SomeCupertinoPageRoute();
            navigationType: FlutterNavigationTypes.IOS,
            onPush: (params) {
                print("onPush ${params}");
            onPop: (params) {
                print("onPop ${params}");
// some_widget_1.dart
import 'package:flutter/cupertino.dart';

class SomeWidget extends StatefulWidget {
  SomeWidget({this.params, this.navigation});
  final Map params;
  final navigation;
  State<StatefulWidget> createState() => SomeWidgetWithState();
class SomeWidgetWithState extends State<Home> {
  Widget build(BuildContext context) {
    return Column(children: <Widget>[
        child: Text('Go to profile'),
        onPressed: () {
          widget.navigation.push(context, "SomeWidget2", {"hello": Null});

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  flutter_navigation: ^0.0.2

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter packages get

Alternatively, your editor might support flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:flutter_navigation/constants.dart';
import 'package:flutter_navigation/page_scaffold.dart';
import 'package:flutter_navigation/app.dart';
import 'package:flutter_navigation/cupertino.dart';
import 'package:flutter_navigation/material.dart';
import 'package:flutter_navigation/navigation.dart';
import 'package:flutter_navigation/navigation_bar.dart';
import 'package:flutter_navigation/navigator.dart';
import 'package:flutter_navigation/unknown_route.dart';
Version Uploaded Documentation Archive
0.0.2 Jan 3, 2019 Go to the documentation of flutter_navigation 0.0.2 Download flutter_navigation 0.0.2 archive
0.0.1 Jan 2, 2019 Go to the documentation of flutter_navigation 0.0.1 Download flutter_navigation 0.0.1 archive
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jan 15, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.10
  • Flutter: 1.1.7


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Document public APIs. (-0.30 points)

123 out of 126 API elements (library, class, field or method) have no adequate dartdoc content. Good documentation improves code readability and discoverability through search.

Fix lib/app.dart. (-0.50 points)

Analysis of lib/app.dart reported 1 hint:

line 24 col 7: This class (or a class which this class inherits from) is marked as '@immutable', but one or more of its instance fields are not final: FlutterNavigation.navigation

Fix lib/cupertino.dart. (-0.50 points)

Analysis of lib/cupertino.dart reported 1 hint:

line 1 col 8: Unused import: 'package:flutter/cupertino.dart'.

Fix lib/material.dart. (-0.50 points)

Analysis of lib/material.dart reported 1 hint:

line 1 col 8: Unused import: 'package:flutter/material.dart'.

Fix additional 4 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/constants.dart (Run flutter format to format lib/constants.dart.)
  • lib/navigation_bar.dart (Run flutter format to format lib/navigation_bar.dart.)
  • lib/navigator.dart (Run flutter format to format lib/navigator.dart.)
  • lib/page_scaffold.dart (Run flutter format to format lib/page_scaffold.dart.)

Maintenance issues and suggestions

Maintain CHANGELOG.md. (-20 points)

Changelog entries help clients to follow the progress in your code.

The description is too short. (-20 points)

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use flutter_navigation.dart.

Package is pre-v0.1 release. (-10 points)

While there is nothing inherently wrong with versions of 0.0.*, it usually means that the author is still experimenting with the general direction of the API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
cupertino_icons ^0.1.2 0.1.2
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies