perfil_screen.dart 12 KB

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