perfil_screen.dart 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  1. import 'package:animate_do/animate_do.dart';
  2. import 'package:flutter/material.dart';
  3. import 'package:turquessa_mesas_hoster/utils/themes.dart';
  4. class PerfilScreen extends StatefulWidget {
  5. const PerfilScreen({super.key});
  6. @override
  7. State<PerfilScreen> createState() => _PerfilScreenState();
  8. }
  9. class _PerfilScreenState extends State<PerfilScreen> {
  10. @override
  11. Widget build(BuildContext context) {
  12. return SlideInRight(
  13. duration: const Duration(milliseconds: 250),
  14. child: Scaffold(
  15. body: Padding(
  16. padding: const EdgeInsets.symmetric(horizontal: 16),
  17. child: Column(
  18. children: [
  19. // Banner principal con fondo azul
  20. // Banner principal con fondo azul
  21. Container(
  22. width: double.infinity,
  23. height: 200,
  24. decoration: const BoxDecoration(
  25. color: Colors.blue,
  26. borderRadius: BorderRadius.only(
  27. bottomLeft: Radius.circular(20),
  28. bottomRight: Radius.circular(20),
  29. ),
  30. ),
  31. child: ClipRRect(
  32. // Añadimos ClipRRect para asegurar que nada se salga de los bordes
  33. borderRadius: const BorderRadius.only(
  34. bottomLeft: Radius.circular(20),
  35. bottomRight: Radius.circular(20),
  36. ),
  37. child: Stack(
  38. children: [
  39. // Texto del banner
  40. const Positioned(
  41. left: 20,
  42. top: 60,
  43. child: Column(
  44. crossAxisAlignment: CrossAxisAlignment.start,
  45. children: [
  46. Text(
  47. 'Bienvenido!',
  48. style: TextStyle(
  49. fontSize: 28,
  50. fontWeight: FontWeight.bold,
  51. color: Colors.white,
  52. ),
  53. ),
  54. SizedBox(height: 8),
  55. Text(
  56. 'Visitanos el día de hoy para una oferta \n especial en productos seleccionados',
  57. style: TextStyle(
  58. fontSize: 24,
  59. fontWeight: FontWeight.bold,
  60. color: Colors.white,
  61. ),
  62. ),
  63. ],
  64. ),
  65. ),
  66. // Imagen posicionada en la esquina inferior derecha
  67. Positioned(
  68. right: 0,
  69. bottom: 0,
  70. child: Image.asset(
  71. 'assets/props.png',
  72. height: 190,
  73. fit: BoxFit.contain,
  74. ),
  75. ),
  76. // Icono de bombilla
  77. Positioned(
  78. right: 80,
  79. top: 60,
  80. child: Container(
  81. padding: const EdgeInsets.all(8),
  82. decoration: const BoxDecoration(
  83. color: Colors.yellow,
  84. shape: BoxShape.circle,
  85. ),
  86. child: const Icon(
  87. Icons.lightbulb,
  88. color: Colors.white,
  89. size: 24,
  90. ),
  91. ),
  92. ),
  93. ],
  94. ),
  95. ),
  96. ),
  97. //? Informaicon de usuario
  98. Padding(
  99. padding: const EdgeInsets.only(top: 16),
  100. child: Container(
  101. width: double.infinity,
  102. padding: const EdgeInsets.all(20),
  103. decoration: BoxDecoration(
  104. color: const Color(0xFFF5F5F5),
  105. borderRadius: BorderRadius.circular(16),
  106. ),
  107. child: Row(
  108. crossAxisAlignment: CrossAxisAlignment.center,
  109. children: [
  110. // Columna izquierda con la información del usuario
  111. Expanded(
  112. child: Column(
  113. crossAxisAlignment: CrossAxisAlignment.start,
  114. children: [
  115. // Nombre del usuario
  116. Text(
  117. 'Usuario Conocido',
  118. style: TextStyle(
  119. fontSize: 22,
  120. fontWeight: FontWeight.bold,
  121. color: AppTheme.secondary,
  122. ),
  123. ),
  124. const SizedBox(height: 8),
  125. // Correo electrónico
  126. Text(
  127. 'yadidelias@gmail.com',
  128. style: TextStyle(
  129. fontSize: 16,
  130. color: AppTheme.secondary,
  131. ),
  132. ),
  133. const SizedBox(height: 8),
  134. // Botón de editar
  135. GestureDetector(
  136. onTap: () {
  137. // Navigator.of(context)
  138. // .pushNamed('editar-perfil');
  139. },
  140. child: const Text(
  141. 'Editar',
  142. style: TextStyle(
  143. fontSize: 16,
  144. fontWeight: FontWeight.w500,
  145. color: Colors.blue,
  146. ),
  147. ),
  148. ),
  149. ],
  150. ),
  151. ),
  152. Container(
  153. width: 80,
  154. height: 80,
  155. child: Image.network(
  156. 'https://st4.depositphotos.com/9998432/22597/v/450/depositphotos_225976914-stock-illustration-person-gray-photo-placeholder-man.jpg',
  157. fit: BoxFit.cover,
  158. ),
  159. ),
  160. ],
  161. ),
  162. ),
  163. ),
  164. Padding(
  165. padding: const EdgeInsets.only(top: 16),
  166. child: ClipRRect(
  167. borderRadius: BorderRadius.circular(16),
  168. child: Container(
  169. height: 110,
  170. padding: const EdgeInsets.symmetric(horizontal: 16),
  171. width: double.infinity,
  172. color: Colors.white,
  173. child: Row(
  174. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  175. children: [
  176. const Row(
  177. children: [
  178. Icon(Icons.nights_stay_rounded, size: 36),
  179. Padding(
  180. padding: EdgeInsets.only(left: 8),
  181. child: Text("Modo oscuro",
  182. style: TextStyle(
  183. fontSize: 29,
  184. fontWeight: FontWeight.bold)),
  185. ),
  186. ],
  187. ),
  188. Switch(
  189. activeColor: Theme.of(context).primaryColor,
  190. value: false,
  191. onChanged: (value) {},
  192. ),
  193. ]),
  194. ),
  195. ),
  196. ),
  197. Padding(
  198. padding: const EdgeInsets.only(top: 16),
  199. child: ClipRRect(
  200. borderRadius: BorderRadius.circular(16),
  201. child: Container(
  202. height: 110,
  203. padding: const EdgeInsets.symmetric(horizontal: 16),
  204. width: double.infinity,
  205. color: Colors.white,
  206. child: Row(
  207. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  208. children: [
  209. const Row(
  210. children: [
  211. Icon(Icons.lock_clock, size: 36),
  212. Padding(
  213. padding: EdgeInsets.only(left: 8),
  214. child: Text("Mis Pedidos",
  215. style: TextStyle(
  216. fontSize: 29,
  217. fontWeight: FontWeight.bold)),
  218. ),
  219. ],
  220. ),
  221. IconButton(
  222. onPressed: () {},
  223. icon:
  224. const Icon(Icons.arrow_forward_ios_rounded)),
  225. ]),
  226. ),
  227. ),
  228. ),
  229. Padding(
  230. padding: const EdgeInsets.only(top: 16),
  231. child: ClipRRect(
  232. borderRadius: BorderRadius.circular(16),
  233. child: Container(
  234. height: 110,
  235. padding: const EdgeInsets.symmetric(horizontal: 16),
  236. width: double.infinity,
  237. color: Colors.white,
  238. child: Row(
  239. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  240. children: [
  241. const Row(
  242. children: [
  243. Icon(Icons.supervised_user_circle_sharp,
  244. size: 36),
  245. Padding(
  246. padding: EdgeInsets.only(left: 8),
  247. child: Text("Conoce más de nosotros",
  248. style: TextStyle(
  249. fontSize: 29,
  250. fontWeight: FontWeight.bold)),
  251. ),
  252. ],
  253. ),
  254. IconButton(
  255. onPressed: () {},
  256. icon:
  257. const Icon(Icons.arrow_forward_ios_rounded)),
  258. ]),
  259. ),
  260. ),
  261. ),
  262. Padding(
  263. padding: const EdgeInsets.only(top: 16),
  264. child: ClipRRect(
  265. borderRadius: BorderRadius.circular(16),
  266. child: Container(
  267. decoration: BoxDecoration(
  268. color: Colors.white,
  269. borderRadius: BorderRadius.circular(16),
  270. border: Border.all(color: Colors.red, width: 3),
  271. ),
  272. height: 110,
  273. padding: const EdgeInsets.symmetric(horizontal: 16),
  274. width: double.infinity,
  275. child: const Center(
  276. child: Row(
  277. mainAxisAlignment: MainAxisAlignment.center,
  278. crossAxisAlignment: CrossAxisAlignment.center,
  279. children: [
  280. Icon(
  281. Icons.logout_outlined,
  282. size: 36,
  283. color: Colors.red,
  284. ),
  285. Text(
  286. "Cerrar Perfil",
  287. style: TextStyle(
  288. fontWeight: FontWeight.bold,
  289. fontSize: 30,
  290. color: Colors.red),
  291. ),
  292. ],
  293. ),
  294. )),
  295. ),
  296. ),
  297. ],
  298. ),
  299. ),
  300. ),
  301. );
  302. }
  303. }