No Description

navigation.dart 2.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. import 'package:flutter_login/flutter_login.dart';
  2. import 'package:flutter/material.dart';
  3. import 'package:google_fonts/google_fonts.dart';
  4. import 'register.dart';
  5. import 'welcome.dart';
  6. import 'profileinfo.dart';
  7. import 'appointments.dart';
  8. import 'package:http/http.dart' as http;
  9. import 'OfficeScreen.dart';
  10. import 'Offices.dart';
  11. import 'package:fast_med_flutter/routes/home.dart';
  12. class NavigationPage extends StatefulWidget{
  13. NavigationPage({Key key, this.title}) : super(key: key);
  14. final String title;
  15. @override
  16. _NavigationPageState createState() => _NavigationPageState();
  17. }
  18. class _NavigationPageState extends State<NavigationPage>{
  19. int _selectedIndex = 0;
  20. static const TextStyle optionStyle = TextStyle(fontSize: 30, fontWeight: FontWeight.bold);
  21. final _pageOptions = [
  22. OfficesScreen(),
  23. ProfilePage(),
  24. Home()
  25. ];
  26. // static const List<Navigator> _widgetOptions = <Navigator>[
  27. // // Navigator.push(
  28. // // context, MaterialPageRoute(builder: (context) => ProfilePage()));
  29. // ];
  30. // void _onItemTapped(int index) {
  31. // setState(() {
  32. // _selectedIndex = index;
  33. // });
  34. // }
  35. @override
  36. Widget build(BuildContext context) {
  37. final height = MediaQuery.of(context).size.height;
  38. return Scaffold(
  39. // appBar: AppBar(
  40. // title: Text("Title"),
  41. // ),
  42. body: _pageOptions[_selectedIndex],
  43. bottomNavigationBar: BottomNavigationBar(
  44. onTap: (int index){
  45. setState(() {
  46. _selectedIndex = index;
  47. });
  48. },
  49. selectedItemColor: Colors.red[800],
  50. currentIndex: _selectedIndex,
  51. // onTap: ,
  52. // currentIndex: ,
  53. // selectedItemColor: Colors.red, onTap: ,
  54. //
  55. items: [
  56. BottomNavigationBarItem(icon: Icon(Icons.medical_services),
  57. label: 'FastMed'),
  58. BottomNavigationBarItem(icon: Icon(Icons.person_rounded),
  59. label: 'Profile'),
  60. BottomNavigationBarItem(icon: Icon(Icons.event_note_rounded),
  61. label: 'Ver Mas')
  62. ],
  63. ),
  64. // body: Container(
  65. //
  66. // ),
  67. );
  68. // TODO: implement build
  69. throw UnimplementedError();
  70. }
  71. }