added cupertino native transition check. bump docs. prepare for release.
This commit is contained in:
parent
bf5de991ad
commit
3d5a90de0d
|
@ -1,3 +1,8 @@
|
||||||
|
# 1.5.0
|
||||||
|
- Native transitions will now use the Cupertino page route on iOS and Material page route on android. This will enable swipe gestures on iOS.
|
||||||
|
- Added cupertino specific transition types.
|
||||||
|
- **You should not be using Cupertino types on non-iOS platforms. It's up to you, but it's bad design**.
|
||||||
|
|
||||||
# 1.4.0
|
# 1.4.0
|
||||||
- Added the ability to define a transition at the point of route definition. Route transitions are optional and any transition defined a "push" will override the route definition.
|
- Added the ability to define a transition at the point of route definition. Route transitions are optional and any transition defined a "push" will override the route definition.
|
||||||
|
|
||||||
|
|
2
LICENSE
2
LICENSE
|
@ -3,7 +3,7 @@ Fluro
|
||||||
Created by Yakka
|
Created by Yakka
|
||||||
https://theyakka.com
|
https://theyakka.com
|
||||||
|
|
||||||
Copyright (c) 2018 Yakka LLC.
|
Copyright (c) 2019 Yakka LLC.
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
The brightest, hippest, coolest router for Flutter.
|
The brightest, hippest, coolest router for Flutter.
|
||||||
|
|
||||||
[![Version](https://img.shields.io/badge/version-1.4.0-blue.svg)](https://pub.dartlang.org/packages/fluro)
|
[![Version](https://img.shields.io/badge/version-1.5.0-blue.svg)](https://pub.dartlang.org/packages/fluro)
|
||||||
[![Build Status](https://travis-ci.org/theyakka/fluro.svg?branch=master)](https://travis-ci.org/theyakka/fluro)
|
[![Build Status](https://travis-ci.org/theyakka/fluro.svg?branch=master)](https://travis-ci.org/theyakka/fluro)
|
||||||
[![Coverage](https://codecov.io/gh/theyakka/fluro/branch/master/graph/badge.svg)](https://codecov.io/gh/theyakka/fluro)
|
[![Coverage](https://codecov.io/gh/theyakka/fluro/branch/master/graph/badge.svg)](https://codecov.io/gh/theyakka/fluro)
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ See CHANGELOG for all breaking (and non-breaking) changes.
|
||||||
You should ensure that you add the router as a dependency in your flutter project.
|
You should ensure that you add the router as a dependency in your flutter project.
|
||||||
```yaml
|
```yaml
|
||||||
dependencies:
|
dependencies:
|
||||||
fluro: "^1.4.0"
|
fluro: "^1.5.0"
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also reference the git repo directly if you want:
|
You can also reference the git repo directly if you want:
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* Created by Yakka
|
* Created by Yakka
|
||||||
* https://theyakka.com
|
* https://theyakka.com
|
||||||
*
|
*
|
||||||
* Copyright (c) 2018 Yakka, LLC. All rights reserved.
|
* Copyright (c) 2019 Yakka, LLC. All rights reserved.
|
||||||
* See LICENSE for distribution and usage details.
|
* See LICENSE for distribution and usage details.
|
||||||
*/
|
*/
|
||||||
import '../../config/application.dart';
|
import '../../config/application.dart';
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* Created by Yakka
|
* Created by Yakka
|
||||||
* https://theyakka.com
|
* https://theyakka.com
|
||||||
*
|
*
|
||||||
* Copyright (c) 2018 Yakka, LLC. All rights reserved.
|
* Copyright (c) 2019 Yakka, LLC. All rights reserved.
|
||||||
* See LICENSE for distribution and usage details.
|
* See LICENSE for distribution and usage details.
|
||||||
*/
|
*/
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* Created by Yakka
|
* Created by Yakka
|
||||||
* https://theyakka.com
|
* https://theyakka.com
|
||||||
*
|
*
|
||||||
* Copyright (c) 2018 Yakka, LLC. All rights reserved.
|
* Copyright (c) 2019 Yakka, LLC. All rights reserved.
|
||||||
* See LICENSE for distribution and usage details.
|
* See LICENSE for distribution and usage details.
|
||||||
*/
|
*/
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* Created by Yakka
|
* Created by Yakka
|
||||||
* https://theyakka.com
|
* https://theyakka.com
|
||||||
*
|
*
|
||||||
* Copyright (c) 2018 Yakka, LLC. All rights reserved.
|
* Copyright (c) 2019 Yakka, LLC. All rights reserved.
|
||||||
* See LICENSE for distribution and usage details.
|
* See LICENSE for distribution and usage details.
|
||||||
*/
|
*/
|
||||||
import '../../helpers/color_helpers.dart';
|
import '../../helpers/color_helpers.dart';
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* Created by Yakka
|
* Created by Yakka
|
||||||
* https://theyakka.com
|
* https://theyakka.com
|
||||||
*
|
*
|
||||||
* Copyright (c) 2018 Yakka, LLC. All rights reserved.
|
* Copyright (c) 2019 Yakka, LLC. All rights reserved.
|
||||||
* See LICENSE for distribution and usage details.
|
* See LICENSE for distribution and usage details.
|
||||||
*/
|
*/
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* Created by Yakka
|
* Created by Yakka
|
||||||
* https://theyakka.com
|
* https://theyakka.com
|
||||||
*
|
*
|
||||||
* Copyright (c) 2018 Yakka, LLC. All rights reserved.
|
* Copyright (c) 2019 Yakka, LLC. All rights reserved.
|
||||||
* See LICENSE for distribution and usage details.
|
* See LICENSE for distribution and usage details.
|
||||||
*/
|
*/
|
||||||
import 'package:fluro/fluro.dart';
|
import 'package:fluro/fluro.dart';
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* Created by Yakka
|
* Created by Yakka
|
||||||
* https://theyakka.com
|
* https://theyakka.com
|
||||||
*
|
*
|
||||||
* Copyright (c) 2018 Yakka, LLC. All rights reserved.
|
* Copyright (c) 2019 Yakka, LLC. All rights reserved.
|
||||||
* See LICENSE for distribution and usage details.
|
* See LICENSE for distribution and usage details.
|
||||||
*/
|
*/
|
||||||
import '../helpers/color_helpers.dart';
|
import '../helpers/color_helpers.dart';
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* Created by Yakka
|
* Created by Yakka
|
||||||
* https://theyakka.com
|
* https://theyakka.com
|
||||||
*
|
*
|
||||||
* Copyright (c) 2018 Yakka, LLC. All rights reserved.
|
* Copyright (c) 2019 Yakka, LLC. All rights reserved.
|
||||||
* See LICENSE for distribution and usage details.
|
* See LICENSE for distribution and usage details.
|
||||||
*/
|
*/
|
||||||
import 'package:fluro/fluro.dart';
|
import 'package:fluro/fluro.dart';
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* Created by Yakka
|
* Created by Yakka
|
||||||
* https://theyakka.com
|
* https://theyakka.com
|
||||||
*
|
*
|
||||||
* Copyright (c) 2018 Yakka, LLC. All rights reserved.
|
* Copyright (c) 2019 Yakka, LLC. All rights reserved.
|
||||||
* See LICENSE for distribution and usage details.
|
* See LICENSE for distribution and usage details.
|
||||||
*/
|
*/
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* Created by Yakka
|
* Created by Yakka
|
||||||
* https://theyakka.com
|
* https://theyakka.com
|
||||||
*
|
*
|
||||||
* Copyright (c) 2018 Yakka, LLC. All rights reserved.
|
* Copyright (c) 2019 Yakka, LLC. All rights reserved.
|
||||||
* See LICENSE for distribution and usage details.
|
* See LICENSE for distribution and usage details.
|
||||||
*/
|
*/
|
||||||
import 'components/app/app_component.dart';
|
import 'components/app/app_component.dart';
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* Created by Yakka
|
* Created by Yakka
|
||||||
* https://theyakka.com
|
* https://theyakka.com
|
||||||
*
|
*
|
||||||
* Copyright (c) 2018 Yakka, LLC. All rights reserved.
|
* Copyright (c) 2019 Yakka, LLC. All rights reserved.
|
||||||
* See LICENSE for distribution and usage details.
|
* See LICENSE for distribution and usage details.
|
||||||
*/
|
*/
|
||||||
library fluro;
|
library fluro;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* Created by Yakka
|
* Created by Yakka
|
||||||
* https://theyakka.com
|
* https://theyakka.com
|
||||||
*
|
*
|
||||||
* Copyright (c) 2018 Yakka, LLC. All rights reserved.
|
* Copyright (c) 2019 Yakka, LLC. All rights reserved.
|
||||||
* See LICENSE for distribution and usage details.
|
* See LICENSE for distribution and usage details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -3,11 +3,12 @@
|
||||||
* Created by Yakka
|
* Created by Yakka
|
||||||
* https://theyakka.com
|
* https://theyakka.com
|
||||||
*
|
*
|
||||||
* Copyright (c) 2018 Yakka, LLC. All rights reserved.
|
* Copyright (c) 2019 Yakka, LLC. All rights reserved.
|
||||||
* See LICENSE for distribution and usage details.
|
* See LICENSE for distribution and usage details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:fluro/fluro.dart';
|
import 'package:fluro/fluro.dart';
|
||||||
import 'package:fluro/src/common.dart';
|
import 'package:fluro/src/common.dart';
|
||||||
|
@ -124,20 +125,31 @@ class Router {
|
||||||
(RouteSettings routeSettings, Map<String, List<String>> parameters) {
|
(RouteSettings routeSettings, Map<String, List<String>> parameters) {
|
||||||
bool isNativeTransition = (transition == TransitionType.native ||
|
bool isNativeTransition = (transition == TransitionType.native ||
|
||||||
transition == TransitionType.nativeModal);
|
transition == TransitionType.nativeModal);
|
||||||
if (transition == TransitionType.cupertino || transition == TransitionType.cupertinoFullScreenDialog) {
|
if (isNativeTransition) {
|
||||||
return new CupertinoPageRoute<dynamic>(
|
if (Platform.isIOS) {
|
||||||
settings: routeSettings,
|
return new CupertinoPageRoute<dynamic>(
|
||||||
fullscreenDialog: transition == TransitionType.cupertinoFullScreenDialog,
|
settings: routeSettings,
|
||||||
builder: (BuildContext context) {
|
fullscreenDialog: transition == TransitionType.nativeModal,
|
||||||
return handler.handlerFunc(context, parameters);
|
builder: (BuildContext context) {
|
||||||
});
|
return handler.handlerFunc(context, parameters);
|
||||||
} else if (isNativeTransition) {
|
});
|
||||||
return new MaterialPageRoute<dynamic>(
|
} else if (transition == TransitionType.cupertino ||
|
||||||
settings: routeSettings,
|
transition == TransitionType.cupertinoFullScreenDialog) {
|
||||||
fullscreenDialog: transition == TransitionType.nativeModal,
|
return new CupertinoPageRoute<dynamic>(
|
||||||
builder: (BuildContext context) {
|
settings: routeSettings,
|
||||||
return handler.handlerFunc(context, parameters);
|
fullscreenDialog:
|
||||||
});
|
transition == TransitionType.cupertinoFullScreenDialog,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return handler.handlerFunc(context, parameters);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
return new MaterialPageRoute<dynamic>(
|
||||||
|
settings: routeSettings,
|
||||||
|
fullscreenDialog: transition == TransitionType.nativeModal,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return handler.handlerFunc(context, parameters);
|
||||||
|
});
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
var routeTransitionsBuilder;
|
var routeTransitionsBuilder;
|
||||||
if (transition == TransitionType.custom) {
|
if (transition == TransitionType.custom) {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* Created by Yakka
|
* Created by Yakka
|
||||||
* https://theyakka.com
|
* https://theyakka.com
|
||||||
*
|
*
|
||||||
* Copyright (c) 2018 Yakka, LLC. All rights reserved.
|
* Copyright (c) 2019 Yakka, LLC. All rights reserved.
|
||||||
* See LICENSE for distribution and usage details.
|
* See LICENSE for distribution and usage details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,13 @@ name: fluro
|
||||||
description: >
|
description: >
|
||||||
Fluro is a Flutter routing library that adds flexible routing options like wildcards, named
|
Fluro is a Flutter routing library that adds flexible routing options like wildcards, named
|
||||||
parameters and clear route definitions.
|
parameters and clear route definitions.
|
||||||
version: 1.4.0
|
version: 1.5.0
|
||||||
author: Yakka, LLC <flutter@theyakka.com>
|
author: Yakka, LLC <apps@theyakka.com>
|
||||||
homepage: https://github.com/theyakka/fluro
|
homepage: https://github.com/theyakka/fluro
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.0.0-dev.58.0 <3.0.0"
|
sdk: ">=2.1.0 <3.0.0"
|
||||||
|
flutter: ">=1.2.0"
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
flutter:
|
||||||
|
@ -16,7 +17,7 @@ dependencies:
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
test: "^1.3.3"
|
test: ^1.6.0
|
||||||
|
|
||||||
flutter:
|
flutter:
|
||||||
uses-material-design: false
|
uses-material-design: false
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* Created by Yakka
|
* Created by Yakka
|
||||||
* https://theyakka.com
|
* https://theyakka.com
|
||||||
*
|
*
|
||||||
* Copyright (c) 2018 Yakka, LLC. All rights reserved.
|
* Copyright (c) 2019 Yakka, LLC. All rights reserved.
|
||||||
* See LICENSE for distribution and usage details.
|
* See LICENSE for distribution and usage details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue