fix: make profile card identical to web version

- Replace banner gradient with pink→sky→cyan→blue matching web visual
- Restore edit pencil button (revert Follow toggle)
- Remove bio/title text (web has none)
- Fix stat values to 1.2K/45/3.4K matching web
- Remove rainbow bar from card bottom
- Update social icons and exp label styling
- Clean up unused state variables

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-14 19:56:08 +05:30
parent 89e12a707b
commit 5d9de1553d

View File

@@ -52,13 +52,11 @@ class _ProfileScreenState extends State<ProfileScreen>
int _animatedLikes = 0;
int _animatedPosts = 0;
int _animatedViews = 0;
bool _isFollowing = false;
String _title = 'Product Designer who focuses on simplicity & usability.';
// Target stat values
static const int _targetLikes = 72900;
static const int _targetPosts = 828;
static const int _targetViews = 342900;
// Target stat values (matching web: 1.2K, 45, 3.4K)
static const int _targetLikes = 1200;
static const int _targetPosts = 45;
static const int _targetViews = 3400;
@override
void initState() {
@@ -654,49 +652,31 @@ class _ProfileScreenState extends State<ProfileScreen>
borderRadius: BorderRadius.circular(16),
gradient: const LinearGradient(
colors: [
Color(0x991E40B1), // rgba(30,64,175,0.6)
Color(0x3394A3B8), // rgba(148,163,184,0.2)
Color(0xFFE879A8), // rose/pink tint (page bg bleed)
Color(0xFF7DD3FC), // sky-300
Color(0xFF67E8F9), // cyan-300
Color(0xFF0284C7), // sky-600
],
stops: [0.0, 0.35, 0.6, 1.0],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
),
image: const DecorationImage(
image: AssetImage('assets/images/gradient_dark_blue.png'),
fit: BoxFit.cover,
opacity: 0.5,
),
),
),
// Follow / Following toggle button (top-right)
// Edit pencil button (top-right, matching web)
Positioned(
top: 8,
right: 8,
top: 16,
right: 16,
child: GestureDetector(
onTap: () => setState(() => _isFollowing = !_isFollowing),
child: AnimatedContainer(
duration: const Duration(milliseconds: 200),
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
onTap: () => _openEditDialog(),
child: Container(
width: 36,
height: 36,
decoration: BoxDecoration(
color: _isFollowing ? Colors.white : Colors.white,
borderRadius: BorderRadius.circular(20),
boxShadow: [
BoxShadow(
color: Colors.black.withValues(alpha: 0.1),
blurRadius: 4,
offset: const Offset(0, 2),
),
],
),
child: Text(
_isFollowing ? 'Following \u2713' : 'Follow +',
style: TextStyle(
fontSize: 13,
fontWeight: FontWeight.w600,
color: _isFollowing
? AppConstants.textSecondary
: AppConstants.textPrimary,
),
color: Colors.white.withValues(alpha: 0.2),
shape: BoxShape.circle,
),
child: const Icon(Icons.edit, color: Colors.white, size: 18),
),
),
),
@@ -749,8 +729,8 @@ class _ProfileScreenState extends State<ProfileScreen>
Text(
'exp.',
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
fontSize: 14,
fontWeight: FontWeight.w300,
color: Colors.grey.shade500,
),
),
@@ -843,10 +823,10 @@ class _ProfileScreenState extends State<ProfileScreen>
Widget _buildSocialIcons() {
final icons = [
Icons.dashboard_outlined,
Icons.camera_alt_outlined,
Icons.alternate_email,
Icons.layers_outlined,
Icons.emoji_events_outlined, // trophy (matching web)
Icons.camera_alt_outlined, // instagram camera
Icons.flutter_dash, // twitter-like bird
Icons.layers_outlined, // layers/stack
];
return Row(
@@ -914,35 +894,21 @@ class _ProfileScreenState extends State<ProfileScreen>
fontSize: 24,
fontWeight: FontWeight.w600,
color: AppConstants.textPrimary,
letterSpacing: -0.3,
),
),
),
const SizedBox(height: 6),
// Title / Bio
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Text(
_title,
style: const TextStyle(
fontSize: 14,
fontWeight: FontWeight.w300,
color: AppConstants.textSecondary,
height: 1.5,
),
),
),
const SizedBox(height: 4),
const SizedBox(height: 8),
// Email
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Text(
_email,
style: TextStyle(
fontSize: 13,
style: const TextStyle(
fontSize: 14,
fontWeight: FontWeight.w300,
color: Colors.grey.shade400,
color: AppConstants.textSecondary,
),
),
),
@@ -954,10 +920,7 @@ class _ProfileScreenState extends State<ProfileScreen>
// Social Icons
_buildSocialIcons(),
const SizedBox(height: 20),
// Rainbow bar at bottom
_buildRainbowBar(),
const SizedBox(height: 16),
],
),
);