Giter Site home page Giter Site logo

pdliuw / airoute Goto Github PK

View Code? Open in Web Editor NEW
29.0 29.0 4.0 1.02 MB

*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

Home Page: https://flutter-app-sample.github.io/

License: BSD 3-Clause "New" or "Revised" License

Kotlin 0.80% Ruby 11.95% Swift 2.28% Objective-C 0.07% Dart 84.55% HTML 0.35%
dart flutter flutter-router route

airoute's Introduction

game

《未选择的路》

黄色的树林里分出两条路,

可惜我不能同时去涉足,

我在那路口久久伫立,

我向着一条路极目望去,

直到它消失在丛林深处。

但我选了另一条路,

它荒草萋萋,十分幽寂,

显得更诱人,更美丽。

虽然在这两条小路上,

都很少留下旅人的足迹。

虽然那天清晨落叶满地,

两条路都未经脚印污染。

啊,留下一条路等改日再见!

但我知道路径延绵无尽头,

恐怕我难以再回返。

也许多少年后在某个地方,

我将轻声叹息将往事回顾:

一片树林里分出两条路

而我选择了人迹更少的一条,

从此决定了我一生的道路。

airoute's People

Contributors

nonnonnon avatar pdliuw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

airoute's Issues

setState() or markNeedsBuild() called when widget tree was locked.

i get this error when i try to use Duration

The following assertion was thrown while finalizing the widget tree:
setState() or markNeedsBuild() called when widget tree was locked.

This _ModalScope<dynamic> widget cannot be marked as needing to build because the framework is locked.
The widget on which setState() or markNeedsBuild() was called was: _ModalScope<dynamic>-[LabeledGlobalKey<_ModalScopeState<dynamic>>#a501a]
  state: _ModalScopeState<dynamic>#877b3
When the exception was thrown, this was the stack: 
#0      Element.markNeedsBuild.<anonymous closure> (package:flutter/src/widgets/framework.dart:3901:9)
#1      Element.markNeedsBuild (package:flutter/src/widgets/framework.dart:3911:6)
#2      State.setState (package:flutter/src/widgets/framework.dart:1168:14)
#3      _ModalScopeState._routeSetState (package:flutter/src/widgets/routes.dart:664:5)
#4      ModalRoute.setState (package:flutter/src/widgets/routes.dart:784:30)

slide animation direction

is any way to set optional direction for slide animation?

for example from left to right, right to left, top to bottom or bottom to top

fade effect

is any solution to make fade effect for slide animation?

how can i implementing this library

could you help me how can i implementing this library on my project?

i get error and i can't resolve that

════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
The following assertion was thrown building Builder:
'package:flutter/src/widgets/navigator.dart': Failed assertion: line 1578 pos 16: 'observer.navigator == null': is not true.


Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=BUG.md

The relevant error-causing widget was: 
  StartupApplication file:///C:/Users/mahdi/AndroidStudioProjects/unlimited_power_pro/lib/main.dart:39:70
When the exception was thrown, this was the stack: 
#2      NavigatorState.didUpdateWidget (package:flutter/src/widgets/navigator.dart:1578:16)
#3      StatefulElement.update (package:flutter/src/widgets/framework.dart:4396:58)
#4      Element.updateChild (package:flutter/src/widgets/framework.dart:2977:15)
#5      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#6      Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
...

my implemented code:

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  Provider.debugCheckInvalidValueType = null;

  SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp, DeviceOrientation.portraitDown]).then((_) {
    runApp(MultiProvider(providers: providers, child: OKToast(child: StartupApplication())));
  });
}

class StartupApplication extends StatefulWidget {
  StartupApplication() {
    Navigation.initRoutes();
  }

  @override
  _StartupApplicationState createState() => _StartupApplicationState();
}

class _StartupApplicationState extends State<StartupApplication> {
  @override
  Widget build(BuildContext context) {
    return Airoute.createMaterialApp(
      title: Fa.appName,
      theme: ThemeData(
        fontFamily: 'IranSansLight',
        primaryColor: Color(0xFF823A84),
        accentColor: Color(0xFF823A84),
        textTheme: TextTheme(title: TextStyle(fontFamily: 'IranSansLight', color: Colors.black)),
      ),
      home: Directionality(
          textDirection: TextDirection.rtl,
          ),
      routes: <String, AirouteBuilder>{
        "/showDocumentContent": () => ShowDocumentContent(),
      },
    );
  }
}

getting error on using pushNamedWithAnimation

when i pull your repository and try to test i get this error on clicking on main page with optional options;

MaterialButton(
  onPressed: () {
    Airoute.pushNamedWithAnimation(
        routeName: "/SecondPage",
        argument: "遇见你,我很开心😄😄😄",
        routePageAnimation: AirouteTransition.Slide);
  },
  color: Theme.of(context).primaryColor,
  textColor: Colors.white,
  child: Text("跳转下一页"),
),

error


════════ Exception caught by gesture ══════
The following assertion was thrown while handling a gesture:
'package:flutter/src/widgets/routes.dart': Failed assertion: line 130 pos 12: 'duration != null && duration >= Duration.zero': is not true.


Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=BUG.md

When the exception was thrown, this was the stack: 
#2      TransitionRoute.createAnimationController (package:flutter/src/widgets/routes.dart:130:12)
#3      PageRoute.createAnimationController (package:flutter/src/widgets/pages.dart:40:50)
#4      TransitionRoute.install (package:flutter/src/widgets/routes.dart:177:19)
#5      ModalRoute.install (package:flutter/src/widgets/routes.dart:959:11)
#6      NavigatorState.push (package:flutter/src/widgets/navigator.dart:1791:11)
...
Handler: "onTap"
Recognizer: TapGestureRecognizer#2bcf9
  debugOwner: GestureDetector
  state: possible
  won arena
  finalPosition: Offset(195.3, 421.0)
  finalLocalPosition: Offset(61.3, 22.0)
  button: 1
  sent tap down
═══════════════════════════════════════════════

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.