polymer_app_router 0.2.4

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

polymer_app_router

Routing for polymer dart

Installing

Add to your pubspec.yaml

dependencies:
    polymer_app_router: "^0.0.2"

then pub get

then import

import 'package:polymer_app_router/polymer_app_router.dart';

Usage

<polymer-app-router selected="{{selected}}">
    <polymer-app-route name="home" path="" is-default>home</polymer-app-route>
    <polymer-app-route name="one" path="one">one</polymer-app-route>
    <polymer-app-route name="two" path="two">two</polymer-app-route>
</polymer-app-router>

API

PolymerRouter.goToName(String name,
      {Map parameters,
      Route startingFrom,
      bool replace: false,
      Map queryParameters,
      bool forceReload: false})
      
PolymerRouter.goToDefault(
      {Map parameters,
      Route startingFrom,
      bool replace: false,
      Map queryParameters,
      bool forceReload: false})
      

Current Route name

  String PolymerRouter.currentRouteName;

Current Page

  PolymerAppRoute PolymerRouter.currentPage;
  

Changelog

0.2.0

  • hierarchical routes now supported (a/b/c ...)
  • Breaking Changes: the element in the page class is now optional

0.1.2

  • Remove polymer_elements (iron-pages)
  • Add Readme

0.1.1

  • Initial version

example/main.dart

import 'package:polymer/polymer.dart';
import 'app.dart';

main() async {
  await initPolymer();
}

1. Depend on it

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


dependencies:
  polymer_app_router: "^0.2.4"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

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

3. Import it

Now in your Dart code, you can use:


import 'package:polymer_app_router/polymer_app_router.dart';
        
Version Uploaded Documentation Archive
0.2.4 May 5, 2016 Go to the documentation of polymer_app_router 0.2.4 Download polymer_app_router 0.2.4 archive
0.2.3 Mar 30, 2016 Go to the documentation of polymer_app_router 0.2.3 Download polymer_app_router 0.2.3 archive
0.2.2 Jan 27, 2016 Go to the documentation of polymer_app_router 0.2.2 Download polymer_app_router 0.2.2 archive
0.2.1 Jan 27, 2016 Go to the documentation of polymer_app_router 0.2.1 Download polymer_app_router 0.2.1 archive
0.2.0 Jan 24, 2016 Go to the documentation of polymer_app_router 0.2.0 Download polymer_app_router 0.2.0 archive
0.1.2 Jan 21, 2016 Go to the documentation of polymer_app_router 0.1.2 Download polymer_app_router 0.1.2 archive
0.1.0 Jan 15, 2016 Go to the documentation of polymer_app_router 0.1.0 Download polymer_app_router 0.1.0 archive
0.0.6 Jan 5, 2016 Go to the documentation of polymer_app_router 0.0.6 Download polymer_app_router 0.0.6 archive
0.0.5+1 Dec 29, 2015 Go to the documentation of polymer_app_router 0.0.5+1 Download polymer_app_router 0.0.5+1 archive
0.0.5 Dec 29, 2015 Go to the documentation of polymer_app_router 0.0.5 Download polymer_app_router 0.0.5 archive

All 14 versions...

Analysis

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

  • Dart: 2.0.0-dev.46.0
  • pana: 0.10.6

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
0 / 100
Health:
Code health derived from static analysis. [more]
44 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0 / 100
Overall score:
Weighted score of the above. [more]
13
Learn more about scoring.

Platforms

Detected platforms: web

Primary library: package:polymer_app_router/polymer_app_router.dart with components: html.

Suggestions

  • Use constrained dependencies.

    The pubspec.yaml contains 3 dependencies without version constraints. Specify version ranges for the following dependencies: analyzer, polymer, reflectable.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 13 errors 6 hints.

    Strong-mode analysis of lib/behavior/polymer_app_route_behavior.dart failed with the following error:

    line: 23 col: 5
    The method 'notifyPath' isn't defined for the class 'PolymerAppRouteBehavior'.

    Strong-mode analysis of lib/behavior/polymer_router_behavior.dart failed with the following error:

    line: 32 col: 5
    The method 'notifyPath' isn't defined for the class 'PolymerRouterBehavior'.

    Similar analysis of the following files failed:

    • lib/page.dart (hint)
    • lib/polymer_app_route/polymer_app_route.dart (hint)
    • lib/polymer_app_router.dart (hint)
  • The description is too short.

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

  • Package is pre-v1 release.

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

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.13.0 <2.0.0
analyzer >=0.27.0 0.29.5 0.31.1
browser ^0.10.0 0.10.0+3
dart_to_js_script_rewriter ^0.1.0+4 0.1.0+4 1.0.3
initialize >=0.6.0 <0.7.0 0.6.2+7
polymer >=1.0.0-rc.14 1.0.0-rc.19
reflectable >=0.5.0 1.0.3 2.0.0
route_hierarchical ^0.6.2 0.6.2 0.7.0
web_components ^0.12.0 0.12.5
Transitive dependencies
args 0.13.7 1.4.1
async 2.0.6
barback 0.15.2+15
charcode 1.1.1
cli_util 0.1.2+1
code_transformers 0.5.1+4
collection 1.14.9
convert 2.0.1
crypto 2.0.2+1
csslib 0.13.7+1 0.14.1
dart_style 0.2.16 1.0.10
glob 1.1.5
html 0.12.2+2 0.13.3
isolate 0.2.3 2.0.0
logging 0.11.3+1
meta 1.1.2
package_config 1.0.3
path 1.5.1
plugin 0.2.0+2
polymer_interop 1.0.0-rc.10
pool 1.3.4
source_maps 0.10.4
source_span 1.4.0
stack_trace 1.9.2
string_scanner 1.0.2
typed_data 1.1.5
utf 0.9.0+4
watcher 0.9.7+7
yaml 2.1.13