All Projects → pdliuw → airoute

pdliuw / airoute

Licence: BSD-3-Clause License
*1、Support routing management without context *2、Support 'non-intrusive parameter passing' routing management *3、Airoute that makes you fall in love with routing management

Programming Languages

dart
5743 projects
ruby
36898 projects - #4 most used programming language
swift
15916 projects

Projects that are alternatives of or similar to airoute

Router
🍭灵活的组件化路由框架.
Stars: ✭ 1,502 (+5462.96%)
Mutual labels:  route
path-to-regexp-php
PHP port of https://github.com/pillarjs/path-to-regexp
Stars: ✭ 21 (-22.22%)
Mutual labels:  route
google streetview
A command line tool and module for Google Street View Image API
Stars: ✭ 77 (+185.19%)
Mutual labels:  route
vue-error-page
[NO LONGER MAINTAINED] Provides a wrapper for router-view that allows you to show error pages without changing the URL.
Stars: ✭ 52 (+92.59%)
Mutual labels:  route
ember-contextual-services
Services in Ember are scoped to the app as a whole and are singletons. Sometimes you don't want that. :) This addon provides ephemeral route-based services.
Stars: ✭ 20 (-25.93%)
Mutual labels:  route
url-trailing-slash
Allows enforcing URL routes with or without trailing slash
Stars: ✭ 35 (+29.63%)
Mutual labels:  route
route observer mixin
RouteObserveMixin provides easy access to didPush/didPop/didPushNext/didPopNext.
Stars: ✭ 27 (+0%)
Mutual labels:  route
route
A fast router for PHP
Stars: ✭ 27 (+0%)
Mutual labels:  route
tentacool
REST API to manage Linux networking via netlink
Stars: ✭ 63 (+133.33%)
Mutual labels:  route
FGRoute
Get your device ip address, router ip or wifi ssid
Stars: ✭ 128 (+374.07%)
Mutual labels:  route
symfony-route-usage
[READ-ONLY] Detect used and unused Symfony routes
Stars: ✭ 41 (+51.85%)
Mutual labels:  route
node-match-path
Matches a URL against a path. Parameters, wildcards, RegExp.
Stars: ✭ 30 (+11.11%)
Mutual labels:  route
next-test-api-route-handler
🚀✨ Confidently unit test your Next.js API routes/handlers in an isolated Next.js-like environment
Stars: ✭ 150 (+455.56%)
Mutual labels:  route
Framework
ThinkPHP Framework
Stars: ✭ 2,399 (+8785.19%)
Mutual labels:  route
laravel-route-model-autobinding
THIS PACKAGE HAS BEEN DEPRECATED — Automatically bind Eloquent models as route segment variables.
Stars: ✭ 14 (-48.15%)
Mutual labels:  route
Think
ThinkPHP Framework ——十年匠心的高性能PHP框架
Stars: ✭ 7,681 (+28348.15%)
Mutual labels:  route
laravel-middleware-cache-response
Laravel中间件-Response缓存
Stars: ✭ 61 (+125.93%)
Mutual labels:  route
optimized-route
Website that uses the Google Maps API to create an optimized route between waypoints. (My first website, from 2016).
Stars: ✭ 17 (-37.04%)
Mutual labels:  route
STCRouter
基于标准URL的iOS路由系统,可实现业务模块组件化,控制器之间零耦合,可实现黑白名单控制,可进行native降级到hybrid。
Stars: ✭ 19 (-29.63%)
Mutual labels:  route
uon
🐨 A tiny 200b route change observer.
Stars: ✭ 83 (+207.41%)
Mutual labels:  route

Airoute | 爱路由

totem


English Document 中文文档

我们的宗旨是:帮助开发者更加便利开发、切身体会编程之美!

airoute:

pub package

*1、支持无需context的路由管理,

*2、支持‘非侵入式参数传递’的路由管理,

*3、让你爱上路由管理的airoute

Airoute项目中的实战应用flutter sample

效果图

iOS Android
airoute_ios airoute_android
:- :-
macOS web
airoute_macos airoute_web
:- :-

1.安装

使用当前包作为依赖库

1. 依赖此库

在文件 'pubspec.yaml' 中添加

pub package


dependencies:

  airoute: ^version

或以这种方式添加


  # Route package.
  airoute:
    git:
      url: https://github.com/pdliuw/airoute.git

2. 安装此库

你可以通过下面的命令行来安装此库


$ flutter pub get


你也可以通过项目开发工具通过可视化操作来执行上述步骤

3. 导入此库

现在,在你的Dart编辑代码中,你可以使用:


import 'package:airoute/airoute.dart';

2.使用

1.在你的项目入口'main.dart'中配置:

Airoute 全局配置


void main() {
  runApp(
    ///
    /// 配置Airoute
    Airoute.createMaterialApp(
      home: LaunchPage(),
      routes: <String, WidgetBuilder>{
        "/LaunchPage": (_) => LaunchPage(),
        "/SecondPage": (_) => SecondPage(),
      },
    ),
  );
}


2.调用/应用

*1、跳转新页面


              Airoute.pushNamed(routeName: "/routeName");

*2、关闭页面


              Airoute.pop();

*3、跳转新页面,并添加动画


              Airoute.pushNamedWithAnimation(
                  routeName: "/routeName",
                  routePageAnimation: AirouteTransition.Slide);

*4、传递参数、接收参数

传递参数


              Airoute.pushNamed(
                routeName: "/Page",
                argument: "遇见你,我很开心😄😄😄",
              );

传递number参数


              Airoute.pushNamed(
                routeName: "/SecondPage",
                argument: 0,
              );

传递Map参数

              Airoute.pushNamed(
                routeName: "/Page",
                argument: {
                  "account":"this is accont",
                  "password":"this is password ",
                },

传递Array参数

              Airoute.pushNamed(
                routeName: "/Page",
                argument: [
                  "Air",
                  "James",
                  "Lucy",
                  "Tom",
                ],
              );
              

接收参数


class Page extends StatefulWidget with AirArgumentReceiver {

  @override
  State<StatefulWidget> createState() {
    return _PageState();
  }

  @override
  void receive(AirArgument argument) {
    print("收到${argument.argument}参数了,我很开心😄😄😄");
  }
}


*5、路由跳转

pub package


          Airoute.push(
            route: AwesomeMessageRoute(
              awesomeMessage: AwesomeHelper.createAwesome(
                  title: "title", message: "message"),
              theme: null,
              settings: RouteSettings(name: "/messageRouteName"),
            ),
          );

*6、更多用法点击,查看更多

待办

  • 支持: 路由拦截器.

LICENSE

BSD 3-Clause License

Copyright (c) 2020, pdliuw
All rights reserved.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].