...
This commit is contained in:
@@ -111,7 +111,7 @@ class _ProfileScreenState extends State<ProfileScreen>
|
||||
|
||||
// Load gamification data for profile EP cards
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
if (mounted) context.read<GamificationProvider>().loadAll();
|
||||
if (mounted) context.read<GamificationProvider>().loadAll(force: true);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -829,7 +829,7 @@ class _ProfileScreenState extends State<ProfileScreen>
|
||||
|
||||
// Username
|
||||
Text(
|
||||
_username,
|
||||
(p?.username.isNotEmpty == true) ? p!.username : _username,
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 24,
|
||||
@@ -840,10 +840,11 @@ class _ProfileScreenState extends State<ProfileScreen>
|
||||
const SizedBox(height: 12),
|
||||
|
||||
// Eventify ID Badge
|
||||
if (_eventifyId != null)
|
||||
if ((p?.eventifyId ?? _eventifyId) != null)
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Clipboard.setData(ClipboardData(text: _eventifyId!));
|
||||
final id = p?.eventifyId ?? _eventifyId!;
|
||||
Clipboard.setData(ClipboardData(text: id));
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(content: Text('ID copied to clipboard')),
|
||||
);
|
||||
@@ -861,7 +862,7 @@ class _ProfileScreenState extends State<ProfileScreen>
|
||||
const Icon(Icons.copy, size: 14, color: Colors.white70),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
_eventifyId!,
|
||||
p?.eventifyId ?? _eventifyId!,
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 13,
|
||||
@@ -882,7 +883,7 @@ class _ProfileScreenState extends State<ProfileScreen>
|
||||
const Icon(Icons.location_on_outlined, color: Colors.white, size: 18),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
_district ?? 'No district selected',
|
||||
p?.district ?? _district ?? 'No district selected',
|
||||
style: const TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.w400),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user