Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.84 KB | None | 0 0
  1. class _HomePageState extends State<HomePage> {
  2. final GlobalKey<ScaffoldState> _scaffoldKey =
  3. GlobalKey<ScaffoldState>();
  4. int _currentTab = 0;
  5. final _pageOptions = [
  6. Text(
  7. 'Home',
  8. style: TextStyle(fontSize: 50.0),
  9. ),
  10. Text(
  11. 'Bible',
  12. style: TextStyle(fontSize: 50.0),
  13. ),
  14. Text(
  15. 'Sermons',
  16. style: TextStyle(fontSize: 50.0),
  17. ),
  18. Text(
  19. 'Prayer',
  20. style: TextStyle(fontSize: 50.0),
  21. ),
  22. MoreNav();
  23. ];
  24.  
  25. @override
  26. Widget build(BuildContext context) {
  27. return Scaffold(
  28. key: _scaffoldKey,
  29. appBar: AppBar(
  30. backgroundColor: Colors.white,
  31. centerTitle: true,
  32. title: Row(
  33. mainAxisAlignment: MainAxisAlignment.center,
  34. mainAxisSize: MainAxisSize.min,
  35. children: <Widget>[
  36. Image.asset(
  37. "assets/4672.png",
  38. fit: BoxFit.contain,
  39. height: 32,
  40. ),
  41. Container(
  42. padding: EdgeInsets.fromLTRB(8, 0, 0, 0),
  43. child: Text(
  44. "Title",
  45. style: TextStyle(color: Colors.lightGreen),
  46. ),
  47. ),
  48. ],
  49. ),
  50. ),
  51. body: _pageOptions[_currentTab],
  52. bottomNavigationBar: bmnav.BottomNav(
  53. elevation: 9.0,
  54. index: _currentTab,
  55. iconStyle: bmnav.IconStyle(
  56. color: Colors.grey, onSelectColor: Colors.lightGreen),
  57. labelStyle: bmnav.LabelStyle(
  58. onSelectTextStyle: TextStyle(color: Colors.lightGreen)),
  59. onTap: (int index) {
  60. setState(() {
  61. _currentTab = index;
  62. });
  63. },
  64. items: [
  65. bmnav.BottomNavItem(Customicons.main, label: "Home"),
  66. bmnav.BottomNavItem(Customicons.bible, label: "Bible"),
  67. bmnav.BottomNavItem(Customicons.sermons, label: "Sermons"),
  68. bmnav.BottomNavItem(FontAwesomeIcons.pray, label:
  69. "Prayer"),
  70. bmnav.BottomNavItem(Icons.more_horiz, label: "More"),
  71. ]),
  72. );
  73. }
  74. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement