flrouter 1.1.2

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • new60

Flrouter [Deprecated]

pub package

Deprecated

Use flutter_router instead. Flrouter is a Flutter routing library that adds flexible routing options like parameters and clear route definitions.

Usage

To use this plugin, add flrouter as a dependency in your pubspec.yaml file.

Usage

// Import package
import 'package:flrouter/flrouter.dart';
runApp(MaterialApp(
  onGenerateRoute: Flrouter({
    '/accounts/{id}': (context, match) => Accounts.View(id: match.parameters['id'),
    '/': (context, match) => Index(),
  }).get,
));

example/lib/main.dart

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

void main() => runApp(MaterialApp(
  onGenerateRoute: Flrouter({
    '/accounts/{id}': (context, match) => Account(match.parameters['id']),
    '/': (context, match) => Index(),
  }).get,
));

class Account extends StatelessWidget {
  final String id;

  Account(this.id);

  @override
  Widget build(BuildContext context) {
    return Scaffold(body: Center(child: Text(this.id)));
  }
}

class Index extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(body: Center(child: Text('Index')));
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  flrouter: ^1.1.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:flrouter/flrouter.dart';
  
Version Uploaded Documentation Archive
1.1.2 Nov 21, 2018 Go to the documentation of flrouter 1.1.2 Download flrouter 1.1.2 archive
1.1.1 Nov 20, 2018 Go to the documentation of flrouter 1.1.1 Download flrouter 1.1.1 archive
1.1.0 Nov 20, 2018 Go to the documentation of flrouter 1.1.0 Download flrouter 1.1.0 archive
1.0.1 Nov 20, 2018 Go to the documentation of flrouter 1.0.1 Download flrouter 1.0.1 archive
1.0.0 Nov 19, 2018 Go to the documentation of flrouter 1.0.0 Download flrouter 1.0.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
26
Health:
Code health derived from static analysis. [more]
90
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
60
Learn more about scoring.

We analyzed this package on Dec 5, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7
  • Flutter: 1.0.0

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Document public APIs (-10 points)

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

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
uri ^0.11.3+1 0.11.3+1
Transitive dependencies
collection 1.14.11
matcher 0.12.4
meta 1.1.6
path 1.6.2
quiver 2.0.1
sky_engine 0.0.99
stack_trace 1.9.3
typed_data 1.1.6
utf 0.9.0+5
vector_math 2.0.8
Dev dependencies
flutter_test