Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:flutter/material.dart';
- import 'package:hungerfood/screens/home_screen.dart';
- import 'package:hungerfood/screens/profile_screen.dart';
- import 'package:hungerfood/screens/search_screen.dart';
- class Root extends StatelessWidget {
- final Map<String, dynamic> _customer;
- Root(this._customer);
- @override
- Widget build(BuildContext context) {
- return DefaultTabController(
- length: 4,
- child: Scaffold(
- body: TabBarView(
- physics: NeverScrollableScrollPhysics(),
- children: <Widget>[
- Home(),
- Search(),
- Profile(this._customer),
- Container(color: Colors.green)
- ],
- ),
- backgroundColor: Colors.white,
- bottomNavigationBar: TabBar(
- tabs: <Widget>[
- // Tab(icon: Icon(Icons.home), text: "Home"),
- // Tab(
- // icon: Icon(Icons.search),
- // text: "Pesquisar",
- // ),
- // Tab(
- // icon: Icon(Icons.person),
- // text: "Perfil",
- // ),
- // Tab(
- // icon: Icon(
- // Icons.list,
- // ),
- // text: "Pedidos",
- // ),
- Container(
- margin: EdgeInsets.only(top: 5),
- width: 65,
- height: 45,
- alignment: Alignment.center,
- child: Column(
- children: <Widget>[Icon(Icons.home), Text("Home")],
- ),
- ),
- Container(
- margin: EdgeInsets.only(top: 5),
- width: 65,
- height: 45,
- alignment: Alignment.center,
- child: Column(
- children: <Widget>[Icon(Icons.search), Text("Pesquisar")],
- ),
- ),
- Container(
- margin: EdgeInsets.only(top: 5),
- width: 65,
- height: 45,
- alignment: Alignment.center,
- child: Column(
- children: <Widget>[Icon(Icons.person), Text("Perfil")],
- ),
- ),
- Container(
- margin: EdgeInsets.only(top: 5),
- width: 65,
- height: 45,
- alignment: Alignment.center,
- child: Column(
- children: <Widget>[Icon(Icons.list), Text("Pedidos")],
- ),
- ),
- ],
- labelColor: Theme.of(context).primaryColor,
- unselectedLabelColor: Colors.black,
- // indicatorSize: TabBarIndicatorSize.label,
- // indicatorPadding: EdgeInsets.all(5.0),
- // labelPadding: EdgeInsets.all(5),
- indicatorColor: Colors.white,
- ),
- ),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement