From e72b10f8d2725e3083a41baf9734bd8ffb8e1f0f Mon Sep 17 00:00:00 2001 From: the-meedu-app Date: Wed, 10 Feb 2021 16:03:29 -0500 Subject: [PATCH] Fixed push with Generic types --- docs/home.md | 2 +- packages/flutter_meedu/CHANGELOG.md | 3 +++ packages/flutter_meedu/example/pubspec.lock | 2 +- .../flutter_meedu/lib/src/router/meedu_page_route.dart | 2 +- packages/flutter_meedu/lib/src/router/router.dart | 4 ++-- packages/flutter_meedu/lib/src/router/utils.dart | 8 ++++---- packages/flutter_meedu/pubspec.yaml | 2 +- 7 files changed, 13 insertions(+), 10 deletions(-) diff --git a/docs/home.md b/docs/home.md index 54e80a09..84e17dea 100644 --- a/docs/home.md +++ b/docs/home.md @@ -28,7 +28,7 @@ Add the following to your pubspec.yaml ```yaml dependencies: meedu: ^0.5.4 - flutter_meedu: ^1.1.1 + flutter_meedu: ^1.1.2 ``` Now you're ready to use **flutter_meedu** diff --git a/packages/flutter_meedu/CHANGELOG.md b/packages/flutter_meedu/CHANGELOG.md index a6e1ac35..8e37cba9 100644 --- a/packages/flutter_meedu/CHANGELOG.md +++ b/packages/flutter_meedu/CHANGELOG.md @@ -1,3 +1,6 @@ +## [1.1.2] +- Fixed push with Generic types. + ## [1.1.1] - Updated meedu: ^0.5.4. diff --git a/packages/flutter_meedu/example/pubspec.lock b/packages/flutter_meedu/example/pubspec.lock index 14df6c3a..05f62088 100644 --- a/packages/flutter_meedu/example/pubspec.lock +++ b/packages/flutter_meedu/example/pubspec.lock @@ -75,7 +75,7 @@ packages: path: ".." relative: true source: path - version: "1.1.1" + version: "1.1.2" flutter_test: dependency: "direct dev" description: flutter diff --git a/packages/flutter_meedu/lib/src/router/meedu_page_route.dart b/packages/flutter_meedu/lib/src/router/meedu_page_route.dart index 45a2f8ba..cc544305 100644 --- a/packages/flutter_meedu/lib/src/router/meedu_page_route.dart +++ b/packages/flutter_meedu/lib/src/router/meedu_page_route.dart @@ -6,7 +6,7 @@ import 'transitions/right_to_left.dart'; import 'transition.dart'; import 'transitions/up_to_down.dart'; -class MeeduPageRoute extends PageRoute { +class MeeduPageRoute extends PageRoute { final Duration transitionDuration; final bool maintainState; final Color barrierColor; diff --git a/packages/flutter_meedu/lib/src/router/router.dart b/packages/flutter_meedu/lib/src/router/router.dart index 54de44ec..add76ba3 100644 --- a/packages/flutter_meedu/lib/src/router/router.dart +++ b/packages/flutter_meedu/lib/src/router/router.dart @@ -33,8 +33,8 @@ Future push( Duration transitionDuration = const Duration(milliseconds: 300), bool backGestureEnabled = false, }) { - return _state.push( - getRoute( + return _state.push( + getRoute( page, arguments: arguments, maintainState: maintainState, diff --git a/packages/flutter_meedu/lib/src/router/utils.dart b/packages/flutter_meedu/lib/src/router/utils.dart index 40b0ce86..1fa5a419 100644 --- a/packages/flutter_meedu/lib/src/router/utils.dart +++ b/packages/flutter_meedu/lib/src/router/utils.dart @@ -5,7 +5,7 @@ import 'navigator.dart'; import 'transition.dart'; /// get the transition -Route getRoute( +Route getRoute( Widget page, { Object arguments, bool maintainState = true, @@ -27,14 +27,14 @@ Route getRoute( switch (_transition) { case Transition.material: - return MaterialPageRoute( + return MaterialPageRoute( builder: (_) => page, maintainState: maintainState, fullscreenDialog: fullscreenDialog, settings: settings, ); case Transition.cupertino: - return CupertinoPageRoute( + return CupertinoPageRoute( builder: (_) => page, maintainState: maintainState, fullscreenDialog: fullscreenDialog, @@ -42,7 +42,7 @@ Route getRoute( ); default: - return MeeduPageRoute( + return MeeduPageRoute( page, settings: settings, maintainState: maintainState, diff --git a/packages/flutter_meedu/pubspec.yaml b/packages/flutter_meedu/pubspec.yaml index 35704bef..d35bb5d3 100644 --- a/packages/flutter_meedu/pubspec.yaml +++ b/packages/flutter_meedu/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_meedu description: A simple State Managment, Dependency Injection, Reactive programming and Navigation for Flutter apps. -version: 1.1.1 +version: 1.1.2 homepage: https://github.com/darwin-morocho/flutter-meedu/tree/master/packages/flutter_meedu documentation: https://flutter.meedu.app