Advertisement
Guest User

Untitled

a guest
Dec 9th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2.  
  3. class Home extends StatefulWidget {
  4. @override
  5. State<StatefulWidget> createState() {
  6. return _HomeState();
  7. }
  8. }
  9.  
  10. class _HomeState extends State<Home> {
  11. @override
  12. Widget build(BuildContext context) {
  13. return Scaffold(
  14. appBar: AppBar(
  15. backgroundColor: Colors.blue,
  16. title: Text('Home page'),
  17. ),
  18. bottomNavigationBar: BottomNavigationBar(
  19. selectedItemColor: Colors.black,
  20. unselectedItemColor: Colors.blue,
  21. currentIndex: 0, // this will be set when a new tab is tapped
  22. items: [
  23. BottomNavigationBarItem(
  24. icon: new Icon(Icons.home),
  25. title: new Text('Home'),
  26. ),
  27. BottomNavigationBarItem(
  28. icon: new Icon(Icons.map),
  29. title: new Text('Map'),
  30. ),
  31. BottomNavigationBarItem(
  32. icon: new Icon(Icons.language),
  33. title: new Text('Useful Links'),
  34. ),
  35. BottomNavigationBarItem(
  36. icon: new Icon(Icons.calendar_today),
  37. title: new Text('Calendar'),
  38. ),
  39. ]
  40. ),
  41. );
  42. }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement