Advertisement
Guest User

Untitled

a guest
Jun 9th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 2.29 KB | None | 0 0
  1.   @override
  2.   Widget build(BuildContext context) {
  3.     return new DefaultTabController(
  4.         initialIndex: 0,
  5.         length: 4,
  6.         child: Container(
  7.           child: new Scaffold(
  8.             backgroundColor: Colors.grey,
  9.             appBar: new AppBar(
  10.                 elevation: 0.0,
  11.                 backgroundColor: Colors.transparent,
  12.                 centerTitle: true,
  13.                 leading: Icon(Icons.arrow_back),
  14.                 actions: <Widget>[
  15.                   IconButton(
  16.                     icon: Icon(Icons.add),
  17.                     onPressed: () {},
  18.                   )
  19.                 ],
  20.                 title: new Text("TAB Test"),
  21.                 bottom: new TabBar(
  22.                   unselectedLabelColor: Colors.black54,
  23.                   isScrollable: true,
  24.                   tabs: <Widget>[
  25.                     new Tab(
  26.                         child: Padding(
  27.                       padding: EdgeInsets.all(12.0),
  28.                       child: Text(
  29.                         "Inbox",
  30.                         textScaleFactor: 1.4,
  31.                       ),
  32.                     )),
  33.                     new Tab(
  34.                         child: Padding(
  35.                       padding: EdgeInsets.all(12.0),
  36.                       child: Text(
  37.                         "Social",
  38.                         textScaleFactor: 1.4,
  39.                       ),
  40.                     )),
  41.                     new Tab(
  42.                         child: Padding(
  43.                       padding: EdgeInsets.all(12.0),
  44.                       child: Text(
  45.                         "Promotions",
  46.                         textScaleFactor: 1.4,
  47.                       ),
  48.                     )),
  49.                     new Tab(
  50.                         child: Padding(
  51.                       padding: EdgeInsets.all(12.0),
  52.                       child: Text(
  53.                         "Updates",
  54.                         textScaleFactor: 1.4,
  55.                       ),
  56.                     )),
  57.                   ],
  58.                   indicator: BoxDecoration(),
  59.                 )),
  60.             body: new TabBarView(children: <Widget>[
  61.               new Container(),
  62.               new Container(),
  63.               new Container(),
  64.               new Container()
  65.             ]),
  66.           ),
  67.         ));
  68.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement