Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class _HomePageState extends State<HomePage> {
- final GlobalKey<ScaffoldState> _scaffoldKey =
- GlobalKey<ScaffoldState>();
- int _currentTab = 0;
- final _pageOptions = [
- Text(
- 'Home',
- style: TextStyle(fontSize: 50.0),
- ),
- Text(
- 'Bible',
- style: TextStyle(fontSize: 50.0),
- ),
- Text(
- 'Sermons',
- style: TextStyle(fontSize: 50.0),
- ),
- Text(
- 'Prayer',
- style: TextStyle(fontSize: 50.0),
- ),
- MoreNav();
- ];
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- key: _scaffoldKey,
- appBar: AppBar(
- backgroundColor: Colors.white,
- centerTitle: true,
- title: Row(
- mainAxisAlignment: MainAxisAlignment.center,
- mainAxisSize: MainAxisSize.min,
- children: <Widget>[
- Image.asset(
- "assets/4672.png",
- fit: BoxFit.contain,
- height: 32,
- ),
- Container(
- padding: EdgeInsets.fromLTRB(8, 0, 0, 0),
- child: Text(
- "Title",
- style: TextStyle(color: Colors.lightGreen),
- ),
- ),
- ],
- ),
- ),
- body: _pageOptions[_currentTab],
- bottomNavigationBar: bmnav.BottomNav(
- elevation: 9.0,
- index: _currentTab,
- iconStyle: bmnav.IconStyle(
- color: Colors.grey, onSelectColor: Colors.lightGreen),
- labelStyle: bmnav.LabelStyle(
- onSelectTextStyle: TextStyle(color: Colors.lightGreen)),
- onTap: (int index) {
- setState(() {
- _currentTab = index;
- });
- },
- items: [
- bmnav.BottomNavItem(Customicons.main, label: "Home"),
- bmnav.BottomNavItem(Customicons.bible, label: "Bible"),
- bmnav.BottomNavItem(Customicons.sermons, label: "Sermons"),
- bmnav.BottomNavItem(FontAwesomeIcons.pray, label:
- "Prayer"),
- bmnav.BottomNavItem(Icons.more_horiz, label: "More"),
- ]),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement