This commit is contained in:
Rishad7594
2026-04-08 19:18:33 +05:30
parent aefb381ed3
commit bbef5b376d
6 changed files with 62 additions and 23 deletions

View File

@@ -1785,7 +1785,7 @@ class _ContributeScreenState extends State<ContributeScreen>
try {
final data = <String, dynamic>{
'title': _titleCtl.text.trim(),
'event_name': _titleCtl.text.trim(),
'category': _selectedCategory,
'district': _selectedDistrict,
'date': _selectedDate!.toIso8601String(),

View File

@@ -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),
),
],