Daibaku
Daibaku

Reputation: 12616

Flutter implementing iOS tab bar is impossible?

I want to know that at this moment, implementing iOS tab bar is possible? After some pushing pages, go back to root when you tap tab like normal app. If possible, where can I find example? I have been searching but not found. Does this make sense?

Upvotes: 0

Views: 1078

Answers (1)

LarssonK
LarssonK

Reputation: 3053

I'm not so familiar with IOS but from what I have seen you can achieve similar functionality using the BottomNavigationBar class https://docs.flutter.io/flutter/material/BottomNavigationBar-class.html or the BottomAppBar class https://docs.flutter.io/flutter/material/BottomAppBar-class.html

example

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),
);

Upvotes: 1

Related Questions