import 'package:flutter/material.dart'; import 'package:ozgurkon_app/screens/About.dart'; import 'package:ozgurkon_app/screens/Chat.dart'; import 'package:ozgurkon_app/widgets/Schedule.dart'; class HomePage extends StatefulWidget { @override State createState() { return _HomeState(); } } class _HomeState extends State { int _currentIndex = 0; final List _children = [ PlaceholderWidget(Colors.white), MyAbout(), WebViewExample() ]; @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text('ÖzgürKon'), ), body: _children[_currentIndex], // new bottomNavigationBar: BottomNavigationBar( onTap: onTabTapped, // new currentIndex: _currentIndex, // this will be set when a new tab is tapped items: [ BottomNavigationBarItem( icon: new Icon(Icons.chat), label: 'Chat', ), BottomNavigationBarItem( icon: new Icon(Icons.live_tv), label: 'Live', ), BottomNavigationBarItem( icon: Icon(Icons.date_range), label: 'Schedule') ], ), ); } void onTabTapped(int index) { setState(() { _currentIndex = index; }); } }