profile_hero_card.dart 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. import 'package:flutter/material.dart';
  2. import 'package:asr_client/models/user_profile.dart';
  3. import 'package:asr_client/theme/app_colors.dart';
  4. class ProfileHeroCard extends StatelessWidget {
  5. const ProfileHeroCard({super.key, required this.profile});
  6. final UserProfile profile;
  7. @override
  8. Widget build(BuildContext context) {
  9. return Container(
  10. margin: const EdgeInsets.all(14),
  11. padding: const EdgeInsets.all(16),
  12. decoration: BoxDecoration(
  13. borderRadius: BorderRadius.circular(16),
  14. gradient: const LinearGradient(
  15. colors: [AppColors.nav, AppColors.nav2],
  16. begin: Alignment.topLeft,
  17. end: Alignment.bottomRight,
  18. ),
  19. boxShadow: [
  20. BoxShadow(
  21. color: AppColors.nav.withValues(alpha: 0.25),
  22. blurRadius: 16,
  23. offset: const Offset(0, 6),
  24. ),
  25. ],
  26. ),
  27. child: Row(
  28. children: [
  29. Container(
  30. width: 56,
  31. height: 56,
  32. decoration: BoxDecoration(
  33. color: AppColors.app,
  34. shape: BoxShape.circle,
  35. border: Border.all(color: Colors.white24, width: 2),
  36. ),
  37. child: Center(
  38. child: Text(
  39. profile.avatarText,
  40. style: const TextStyle(
  41. fontSize: 22,
  42. fontWeight: FontWeight.w800,
  43. color: Colors.white,
  44. ),
  45. ),
  46. ),
  47. ),
  48. const SizedBox(width: 14),
  49. Expanded(
  50. child: Column(
  51. crossAxisAlignment: CrossAxisAlignment.start,
  52. children: [
  53. Text(
  54. profile.name,
  55. style: const TextStyle(
  56. fontSize: 18,
  57. fontWeight: FontWeight.w800,
  58. color: Colors.white,
  59. ),
  60. ),
  61. const SizedBox(height: 2),
  62. Text(
  63. '${profile.role} · ${profile.employeeId}',
  64. style: const TextStyle(
  65. fontSize: 12,
  66. color: Color(0xFFB8D3EA),
  67. ),
  68. ),
  69. ],
  70. ),
  71. ),
  72. ],
  73. ),
  74. );
  75. }
  76. }