Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 统一跳转行为 #405

Merged

Conversation

zymxxxs
Copy link
Contributor

@zymxxxs zymxxxs commented Nov 8, 2019

本PR做了什么?

  • 统一跳转行为,并支持侧滑返回(iOS)

修改范围

  • TransitionType.inFromRight 改为 TransitionType.native
    • 其内部会在 iOS 平台使用 CupertinoPageRoute,在 android 平台是用 MaterialPageRoute,同时 iOS 上支持 侧滑返回
  • 显示指定 TransitionType.nativeModal
    • 使用 navigateTo 进行跳转,如果没有指定 TransitionType, 则会使用 SlideTransition 进行跳转(表现为 bottom -> top),指定 TransitionType.nativeModal 之后在跳转动画上是保持一致的,其他特性跟随平台而定。fullscreenDialog 解释如下:
 /// Whether this page route is a full-screen dialog.
  ///
  /// In Material and Cupertino, being fullscreen has the effects of making
  /// the app bars have a close button instead of a back button. On
  /// iOS, dialogs transitions animate differently and are also not closeable
  /// with the back swipe gesture.
  final bool fullscreenDialog;

@hanxu317317
Copy link
Collaborator

兄弟. 这个PR不错.

@zymxxxs
Copy link
Contributor Author

zymxxxs commented Nov 8, 2019

@hanxu317317

😄

@zymxxxs
Copy link
Contributor Author

zymxxxs commented Nov 8, 2019

merge?

@hanxu317317 hanxu317317 merged commit c601715 into alibaba:master Nov 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants