ios - 使用 Flutter 的 Cupertino 小部件,我如何触发底部标签栏顶部的水平页面转换

标签 ios flutter flutter-navigation flutter-cupertino

不是在其中一个选项卡内使用常见的水平页面过渡,也不是在选项卡栏顶部使用常见的垂直页面过渡,我如何才能在标签栏顶部水平推送页面过渡?

这在中文平台类型的应用中很常见。

enter image description here

最佳答案

警告:它可以在 iOS 中实现,但不一定是应用程序的良好信息架构,Apple 的人机界面指南也不推荐。

参见 App Architecture's Navigation部分和 Bars' Tab Bars部分。

Use a tab bar to present peer categories of content or functionality. A tab bar lets people quickly and easily switch between categories, regardless of the current location.

In general, use a tab bar to organize information at the app level. A tab bar is a good way to flatten your information hierarchy and provide access to several peer information categories or modes at once.

在 Flutter 中,每个选项卡内部的水平页面转换的常见 iOS 并行导航模式是通过让每个选项卡通过 CupertinoTabView 拥有自己的导航器和导航堆栈来实现的。秒。

要撤消该模式并在选项卡上方 进行水平页面转换,请不要插入 CupertinoTabView s 作为每个选项卡的根子项。这将删除 iOS 中常见的并行导航模式。

然后通过以下方式触发正常的路由推送:

Navigator.of(context).push(CupertinoPageRoute<void>(
  builder: (BuildContext context) => ...,
);

或类似的东西。

enter image description here

关于ios - 使用 Flutter 的 Cupertino 小部件,我如何触发底部标签栏顶部的水平页面转换,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53890280/

相关文章:

ios - 如何在Objective-c的Xcode中使UIImage工作

ios - tableView 中 uiimage 的指示器

flutter - Flutter:使用await时的差异

flutter - 在 Flutter 中使用嵌套的 Navigator 和 WillPopScope

flutter - 如何使用 pushNamed 传递的参数?

Flutter - 在 PopupMenuButton onTap 中导航不起作用

ios - Crashlytics 没有给出正确的崩溃报告

ios - 'UIViewController' 到 'WWCalendarTimeSelector.VNClockViewController'

在 Flutter 中使用 Cookie 发布请求

android - flutter const构造函数错误