modal_infonegaocio.dart 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. import 'package:animate_do/animate_do.dart';
  2. import 'package:flutter/material.dart';
  3. import 'package:provider/provider.dart';
  4. import 'package:turquessa_mesas_hoster/mvvm/viewmodels/home_view_model.dart';
  5. import 'package:turquessa_mesas_hoster/utils/themes.dart';
  6. void setModalOffService(BuildContext context) {
  7. final homeviewmodel = Provider.of<HomeViewModel>(context, listen: false);
  8. if (homeviewmodel.isopen) {
  9. mostrarInformacionNegocioBottomSheet(context);
  10. }
  11. }
  12. void mostrarInformacionNegocioBottomSheet(BuildContext context) {
  13. final homeviewmodel = Provider.of<HomeViewModel>(context, listen: false);
  14. showModalBottomSheet(
  15. context: context,
  16. isScrollControlled: true,
  17. backgroundColor: Colors.transparent,
  18. builder: (context) => SlideInUp(
  19. duration: const Duration(milliseconds: 450),
  20. child: Container(
  21. height: MediaQuery.of(context).size.height * 0.7,
  22. decoration: const BoxDecoration(
  23. color: Colors.white,
  24. borderRadius: BorderRadius.only(
  25. topLeft: Radius.circular(25),
  26. topRight: Radius.circular(25),
  27. ),
  28. ),
  29. child: SingleChildScrollView(
  30. child: Column(
  31. crossAxisAlignment: CrossAxisAlignment.start,
  32. children: [
  33. Container(
  34. height: 150,
  35. width: double.infinity,
  36. decoration: BoxDecoration(
  37. borderRadius: const BorderRadius.only(
  38. topLeft: Radius.circular(25),
  39. topRight: Radius.circular(25),
  40. ),
  41. image: DecorationImage(
  42. image: const AssetImage('assets/turquessa_prop.jpg'),
  43. fit: BoxFit.cover,
  44. colorFilter: ColorFilter.mode(
  45. Colors.black.withOpacity(0.3),
  46. BlendMode.darken,
  47. ),
  48. ),
  49. ),
  50. child: Center(
  51. child: Column(
  52. mainAxisAlignment: MainAxisAlignment.center,
  53. children: [
  54. Container(
  55. padding: const EdgeInsets.all(8),
  56. decoration: BoxDecoration(
  57. color: Colors.white,
  58. borderRadius: BorderRadius.circular(10),
  59. ),
  60. child: Image.asset('assets/Turquessa.png', height: 50),
  61. ),
  62. const SizedBox(height: 10),
  63. const Text(
  64. 'Turquessa-Coffee',
  65. style: TextStyle(
  66. color: Colors.white,
  67. fontSize: 24,
  68. fontWeight: FontWeight.bold,
  69. ),
  70. ),
  71. ],
  72. ),
  73. ),
  74. ),
  75. Row(
  76. mainAxisAlignment: MainAxisAlignment.center,
  77. crossAxisAlignment: CrossAxisAlignment.center,
  78. children: [
  79. Padding(
  80. padding: const EdgeInsets.all(15),
  81. child: Text(
  82. homeviewmodel.isopen
  83. ? "Turquessa Esta: Abierto"
  84. : "Turquessa Esta: Cerrado",
  85. style: TextStyle(
  86. fontSize: 30,
  87. color: AppTheme.primary,
  88. fontWeight: FontWeight.bold),
  89. ),
  90. ),
  91. ],
  92. ),
  93. // Sección de información
  94. Padding(
  95. padding: const EdgeInsets.all(20),
  96. child: Column(
  97. crossAxisAlignment: CrossAxisAlignment.start,
  98. children: [
  99. const Text(
  100. 'Acerca de nosotros',
  101. style: TextStyle(
  102. fontSize: 18,
  103. fontWeight: FontWeight.bold,
  104. color: Color(0xFF2FD0E5),
  105. ),
  106. ),
  107. const SizedBox(height: 8),
  108. const Text(
  109. 'Turquessa-Coffee es una cafetería de especialidad con los mejores granos seleccionados. Nuestro compromiso es ofrecer una experiencia única en cada taza.',
  110. style: TextStyle(fontSize: 14, color: Colors.black87),
  111. ),
  112. const SizedBox(height: 20),
  113. // Información de contacto
  114. _buildInfoItem(Icons.location_on, 'Dirección',
  115. 'C. Quintero Arce 248, El Llano'),
  116. _buildInfoItem(Icons.access_time, 'Horario',
  117. 'Lun-Sáb: 8 a.m.- 10 p.m.\nDom: 4:00 p.m - 10 p.m'),
  118. _buildInfoItem(Icons.phone, 'Teléfono', '(662) 466 6626'),
  119. _buildInfoItem(
  120. Icons.email, 'Contacto', 'turquessacoffee@info.com'),
  121. _buildInfoItem(
  122. Icons.language, 'Sitio web', 'turquessacoffee.com'),
  123. const SizedBox(height: 20),
  124. // Redes sociales
  125. const Text(
  126. 'Síguenos en redes sociales',
  127. style: TextStyle(
  128. fontSize: 18,
  129. fontWeight: FontWeight.bold,
  130. color: Color(0xFF2FD0E5),
  131. ),
  132. ),
  133. const SizedBox(height: 10),
  134. Row(
  135. mainAxisAlignment: MainAxisAlignment.spaceEvenly,
  136. children: [
  137. _buildSocialButton(Icons.facebook, 'Facebook'),
  138. _buildSocialButton(Icons.camera_alt, 'Instagram'),
  139. _buildSocialButton(Icons.chat_bubble, 'Twitter'),
  140. ],
  141. ),
  142. const SizedBox(height: 30),
  143. Center(
  144. child: TextButton(
  145. onPressed: () => Navigator.pop(context),
  146. child: Container(
  147. padding: const EdgeInsets.symmetric(
  148. horizontal: 30, vertical: 10),
  149. decoration: BoxDecoration(
  150. color: const Color(0xFF2FD0E5),
  151. borderRadius: BorderRadius.circular(20),
  152. ),
  153. child: const Text('Cerrar',
  154. style: TextStyle(color: Colors.white)),
  155. ),
  156. ),
  157. ),
  158. const SizedBox(height: 20),
  159. ],
  160. ),
  161. ),
  162. ],
  163. ),
  164. ),
  165. ),
  166. ),
  167. );
  168. }
  169. // Widgets auxiliares para el Bottom Sheet
  170. Widget _buildInfoItem(IconData icon, String title, String content) {
  171. return Padding(
  172. padding: const EdgeInsets.symmetric(vertical: 10),
  173. child: Row(
  174. crossAxisAlignment: CrossAxisAlignment.start,
  175. children: [
  176. Container(
  177. padding: const EdgeInsets.all(8),
  178. decoration: BoxDecoration(
  179. color: const Color(0xFFE6F9FB),
  180. borderRadius: BorderRadius.circular(8),
  181. ),
  182. child: Icon(icon, color: const Color(0xFF2FD0E5), size: 22),
  183. ),
  184. const SizedBox(width: 15),
  185. Expanded(
  186. child: Column(
  187. crossAxisAlignment: CrossAxisAlignment.start,
  188. children: [
  189. Text(
  190. title,
  191. style: const TextStyle(
  192. fontSize: 16,
  193. fontWeight: FontWeight.bold,
  194. color: Colors.black87,
  195. ),
  196. ),
  197. const SizedBox(height: 4),
  198. Text(
  199. content,
  200. style: const TextStyle(color: Colors.black54, fontSize: 14),
  201. ),
  202. ],
  203. ),
  204. ),
  205. ],
  206. ),
  207. );
  208. }
  209. Widget _buildSocialButton(IconData icon, String platform) {
  210. return Column(
  211. children: [
  212. Container(
  213. padding: const EdgeInsets.all(12),
  214. decoration: BoxDecoration(
  215. color: const Color(0xFFE6F9FB),
  216. borderRadius: BorderRadius.circular(12),
  217. ),
  218. child: Icon(icon, color: const Color(0xFF2FD0E5), size: 24),
  219. ),
  220. const SizedBox(height: 5),
  221. Text(platform, style: const TextStyle(fontSize: 12)),
  222. ],
  223. );
  224. }