Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 2.78 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2.  
  3. import 'package:hungerfood/screens/home_screen.dart';
  4. import 'package:hungerfood/screens/profile_screen.dart';
  5. import 'package:hungerfood/screens/search_screen.dart';
  6.  
  7. class Root extends StatelessWidget {
  8.   final Map<String, dynamic> _customer;
  9.   Root(this._customer);
  10.   @override
  11.   Widget build(BuildContext context) {
  12.     return DefaultTabController(
  13.       length: 4,
  14.       child: Scaffold(
  15.         body: TabBarView(
  16.           physics: NeverScrollableScrollPhysics(),
  17.           children: <Widget>[
  18.             Home(),
  19.             Search(),
  20.             Profile(this._customer),
  21.             Container(color: Colors.green)
  22.           ],
  23.         ),
  24.         backgroundColor: Colors.white,
  25.         bottomNavigationBar: TabBar(
  26.           tabs: <Widget>[
  27.             // Tab(icon: Icon(Icons.home), text: "Home"),
  28.             // Tab(
  29.             //   icon: Icon(Icons.search),
  30.             //   text: "Pesquisar",
  31.             // ),
  32.             // Tab(
  33.             //   icon: Icon(Icons.person),
  34.             //   text: "Perfil",
  35.             // ),
  36.             // Tab(
  37.             //   icon: Icon(
  38.             //     Icons.list,
  39.             //   ),
  40.             //   text: "Pedidos",
  41.             // ),
  42.             Container(
  43.               margin: EdgeInsets.only(top: 5),
  44.               width: 65,
  45.               height: 45,
  46.               alignment: Alignment.center,
  47.               child: Column(
  48.                 children: <Widget>[Icon(Icons.home), Text("Home")],
  49.               ),
  50.             ),
  51.             Container(
  52.               margin: EdgeInsets.only(top: 5),
  53.               width: 65,
  54.               height: 45,
  55.               alignment: Alignment.center,
  56.               child: Column(
  57.                 children: <Widget>[Icon(Icons.search), Text("Pesquisar")],
  58.               ),
  59.             ),
  60.             Container(
  61.               margin: EdgeInsets.only(top: 5),
  62.               width: 65,
  63.               height: 45,
  64.               alignment: Alignment.center,
  65.               child: Column(
  66.                 children: <Widget>[Icon(Icons.person), Text("Perfil")],
  67.               ),
  68.             ),
  69.             Container(
  70.               margin: EdgeInsets.only(top: 5),
  71.               width: 65,
  72.               height: 45,
  73.               alignment: Alignment.center,
  74.               child: Column(
  75.                 children: <Widget>[Icon(Icons.list), Text("Pedidos")],
  76.               ),
  77.             ),
  78.           ],
  79.           labelColor: Theme.of(context).primaryColor,
  80.           unselectedLabelColor: Colors.black,
  81.           // indicatorSize: TabBarIndicatorSize.label,
  82.           // indicatorPadding: EdgeInsets.all(5.0),
  83.           // labelPadding: EdgeInsets.all(5),
  84.           indicatorColor: Colors.white,
  85.         ),
  86.       ),
  87.     );
  88.   }
  89. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement