home_screen.dart 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. import 'package:flutter/material.dart';
  2. import 'package:turquessa_mesas_hoster/utils/widgets/custom_appbar.dart';
  3. import '../../../utils/widgets/widgets.dart';
  4. import 'package:flutter/material.dart';
  5. import 'package:provider/provider.dart';
  6. import '../../../utils/themes.dart';
  7. class HomeScreen extends StatefulWidget {
  8. const HomeScreen({super.key});
  9. @override
  10. Formulario createState() => Formulario();
  11. }
  12. class Formulario extends State<HomeScreen> {
  13. @override
  14. void initState() {
  15. super.initState();
  16. }
  17. @override
  18. Widget build(BuildContext context) {
  19. var _selectedIndex;
  20. return Scaffold(
  21. backgroundColor: Colors.grey.shade200,
  22. appBar: AppBar(
  23. title: const CustomAppbar(),
  24. ),
  25. body: Row(
  26. children: [
  27. NavigationRail(
  28. backgroundColor: Color.fromARGB(255, 25, 30, 41),
  29. selectedIndex: _selectedIndex,
  30. onDestinationSelected: (int index) {
  31. setState(() {
  32. _selectedIndex = index;
  33. });
  34. },
  35. labelType: NavigationRailLabelType.all,
  36. destinations: const [
  37. NavigationRailDestination(
  38. icon: Icon(Icons.home, color: Colors.white),
  39. selectedIcon: Icon(Icons.home_filled),
  40. label: Text('Inicio'),
  41. ),
  42. NavigationRailDestination(
  43. icon: Icon(Icons.search),
  44. selectedIcon: Icon(
  45. Icons.search_rounded,
  46. color: Colors.white,
  47. ),
  48. label: Text('Buscar'),
  49. ),
  50. NavigationRailDestination(
  51. icon: Icon(Icons.settings),
  52. selectedIcon: Icon(Icons.settings_rounded, color: Colors.white),
  53. label: Text('Ajustes'),
  54. ),
  55. ],
  56. ),
  57. const Expanded(
  58. child: Center(
  59. child: Padding(padding: EdgeInsets.symmetric(vertical: 10)
  60. // child: GridView,
  61. )
  62. // child: Image(
  63. // image: AssetImage('assets/logo.png'),
  64. // height: 400,
  65. // ),
  66. ),
  67. ),
  68. ],
  69. ),
  70. );
  71. }
  72. }