Flutter实现iOS标签栏是不可能的?

问题描述 投票:0回答:2

我想知道,此时,实现iOS标签栏是否可行?在推送页面之后,当您点按正常应用程序的标签时,请返回到root。如果可能的话,我在哪里可以找到例子?我一直在寻找,但没找到。这有意义吗?

flutter
2个回答
1
投票

我对IOS不太熟悉,但从我看到的你可以使用BottomNavigationBar类https://docs.flutter.io/flutter/material/BottomNavigationBar-class.html或BottomAppBar类https://docs.flutter.io/flutter/material/BottomAppBar-class.html实现类似的功能

new Scaffold(
  bottomNavigationBar: new BottomAppBar(
    color: Colors.white,
    child: new Row(
      mainAxisSize: MainAxisSize.max,
      mainAxisAlignment: MainAxisAlignment.spaceBetween,
      children: <Widget>[
        IconButton(icon:Icon(Icons.home, color: Colors.grey), onPressed: (){},),
         IconButton(icon:Icon(Icons.help, color: Colors.grey), onPressed: (){},),
          IconButton(icon:Icon(Icons.settings, color: Colors.grey), onPressed: (){},)
    ],
    ),
  ),
  floatingActionButton: new FloatingActionButton(onPressed: null),
);

1
投票

是的,MTechViral有一个视频显示如何像cupertino一样的风格,这里是链接https://youtu.be/f4kXyOkfe6I

© www.soinside.com 2019 - 2024. All rights reserved.