home_screen.dart 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. import 'package:flutter/material.dart';
  2. import 'package:turquessa_mesas_hoster/utils/widgets/custom_appbar.dart';
  3. import 'package:turquessa_mesas_hoster/mvvm/views/home/categorias_navbar.dart';
  4. class HomeScreen extends StatefulWidget {
  5. const HomeScreen({super.key});
  6. @override
  7. State<HomeScreen> createState() => _HomeScreenState();
  8. }
  9. class _HomeScreenState extends State<HomeScreen> {
  10. @override
  11. void initState() {
  12. super.initState();
  13. }
  14. handleTap() {
  15. print('Tapped');
  16. }
  17. @override
  18. Widget build(BuildContext context) {
  19. return Scaffold(
  20. backgroundColor: Colors.white,
  21. body: Column(
  22. children: [
  23. Container(
  24. height: 120,
  25. width: double.infinity,
  26. decoration: BoxDecoration(
  27. image: DecorationImage(
  28. image: Image.asset('assets/Turquessa.png').image,
  29. fit: BoxFit.cover,
  30. ),
  31. ),
  32. ),
  33. Container(
  34. color: Color.fromARGB(255, 47, 208, 229),
  35. padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10),
  36. child: Row(
  37. children: [
  38. Container(
  39. width: 80,
  40. height: 80,
  41. decoration: BoxDecoration(
  42. color: Colors.white,
  43. borderRadius: BorderRadius.circular(12),
  44. ),
  45. child: Center(
  46. child: Image.asset('assets/Turquessa.png'),
  47. ),
  48. ),
  49. const SizedBox(width: 20),
  50. const Text(
  51. 'Turquessa',
  52. style: TextStyle(
  53. color: Colors.black,
  54. fontSize: 26,
  55. fontWeight: FontWeight.bold,
  56. ),
  57. ),
  58. const SizedBox(width: 15),
  59. Container(
  60. padding: const EdgeInsets.all(8),
  61. decoration: BoxDecoration(
  62. shape: BoxShape.circle,
  63. border: Border.all(color: Colors.white, width: 2),
  64. ),
  65. child:
  66. const Icon(Icons.info, color: Colors.white, size: 20),
  67. ),
  68. ],
  69. ),
  70. ),
  71. const CategoriasNavBar(),
  72. // Burger menu items
  73. Expanded(
  74. child: ListView(
  75. children: [
  76. _buildBurgerItem(
  77. "1. HAMBURGUESA SENCILLA",
  78. "QUESO, LECHUGA, TOMATE, CEBOLLA, PEPINILLO, MAYONESA, KETCHUP Y ...",
  79. "MXN 115.00",
  80. "https://pos.api.turquessacoffee.com/assets/recurso/2024/10/iwf7MocBl2Kb5Wzzl7xHjPyQ99OljQH.jpg"),
  81. const Divider(color: Colors.grey, height: 1),
  82. _buildBurgerItem(
  83. "2. SINGLE BURGER",
  84. "HAMBURGUESA SOLA",
  85. "MXN 90.00",
  86. "https://pos.api.turquessacoffee.com/assets/recurso/2024/10/qgoqrqz8pO9UBN7P412Cxtz_2n2LQy_O.jpg"),
  87. const Divider(color: Colors.grey, height: 1),
  88. _buildBurgerItem(
  89. "3. BACON BURGER",
  90. "HAMBURGUESA SENCILLA MÁS TOCINO. PAPAS Y SODA",
  91. "MXN 130.00",
  92. "https://pos.api.turquessacoffee.com/assets/recurso/2024/10/Z6GgNgittxZpqN7qj6ub9_sKHZxUn8i0.png"),
  93. ],
  94. ),
  95. ),
  96. ],
  97. ));
  98. }
  99. }
  100. Widget _buildBurgerItem(
  101. String title, String description, String price, String imageUrl) {
  102. return Padding(
  103. padding: const EdgeInsets.symmetric(vertical: 20),
  104. child: Row(
  105. crossAxisAlignment: CrossAxisAlignment.start,
  106. children: [
  107. const SizedBox(width: 20),
  108. ClipRRect(
  109. borderRadius: BorderRadius.circular(8),
  110. child: Image.network(
  111. imageUrl,
  112. width: 120,
  113. height: 120,
  114. fit: BoxFit.cover,
  115. ),
  116. ),
  117. const SizedBox(width: 20),
  118. Expanded(
  119. child: Column(
  120. crossAxisAlignment: CrossAxisAlignment.start,
  121. children: [
  122. Text(
  123. title,
  124. style: const TextStyle(
  125. color: Colors.black,
  126. fontSize: 22,
  127. fontWeight: FontWeight.bold,
  128. ),
  129. ),
  130. const SizedBox(height: 10),
  131. Text(
  132. description,
  133. style: const TextStyle(
  134. color: Colors.grey,
  135. fontSize: 16,
  136. ),
  137. ),
  138. const SizedBox(height: 20),
  139. Text(
  140. price,
  141. style: const TextStyle(
  142. color: Colors.black,
  143. fontSize: 24,
  144. fontWeight: FontWeight.bold,
  145. ),
  146. ),
  147. ],
  148. ),
  149. ),
  150. const SizedBox(width: 20),
  151. ],
  152. ),
  153. );
  154. }