fix: make Continue as Guest button visible, guard wishlist for guests
The guest button was nearly invisible (grey text, fontSize 13 on dark background). Now uses white70, fontSize 15, TextButton with proper tap padding. Also guards wishlist toggle on event detail page. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,7 @@ import 'package:cached_network_image/cached_network_image.dart';
|
||||
|
||||
import '../features/events/models/event_models.dart';
|
||||
import '../features/events/services/events_service.dart';
|
||||
import '../core/auth/auth_guard.dart';
|
||||
|
||||
class LearnMoreScreen extends StatefulWidget {
|
||||
final int eventId;
|
||||
@@ -345,7 +346,10 @@ class _LearnMoreScreenState extends State<LearnMoreScreen> {
|
||||
_squareIconButton(
|
||||
icon: _wishlisted ? Icons.favorite : Icons.favorite_border,
|
||||
iconColor: _wishlisted ? Colors.redAccent : Colors.white,
|
||||
onTap: () => setState(() => _wishlisted = !_wishlisted),
|
||||
onTap: () {
|
||||
if (!AuthGuard.requireLogin(context, reason: 'Sign in to save events to your wishlist.')) return;
|
||||
setState(() => _wishlisted = !_wishlisted);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -515,21 +515,25 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
|
||||
// Continue as Guest
|
||||
Center(
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
child: TextButton(
|
||||
onPressed: () {
|
||||
AuthGuard.setGuest(true);
|
||||
Navigator.of(context).pushAndRemoveUntil(
|
||||
MaterialPageRoute(builder: (_) => const HomeScreen()),
|
||||
(route) => false,
|
||||
);
|
||||
},
|
||||
style: TextButton.styleFrom(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 12),
|
||||
),
|
||||
child: const Text(
|
||||
'Continue as Guest',
|
||||
style: TextStyle(
|
||||
color: _textMuted,
|
||||
fontSize: 13,
|
||||
color: Colors.white70,
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.w500,
|
||||
decoration: TextDecoration.underline,
|
||||
decorationColor: _textMuted,
|
||||
decorationColor: Colors.white70,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user