add placeholder in carousel

This commit is contained in:
2026-03-12 11:06:46 +01:00
parent 28feaa1f01
commit 89cf876707
3 changed files with 40 additions and 2 deletions

View File

@@ -32,7 +32,39 @@ class _MyTournamentsCarouselState extends State<MyTournamentsCarousel> {
final tournaments = snapshot.data ?? [];
if (tournaments.isEmpty) {
return const SizedBox.shrink();
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Padding(
padding: EdgeInsets.fromLTRB(16, 16, 16, 8),
child: Text(
'My Tournaments',
style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
),
),
SizedBox(
height: 150,
child: Card(
margin: const EdgeInsets.symmetric(horizontal: 8),
elevation: 4,
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(Icons.emoji_events_outlined, size: 48, color: Colors.grey),
const SizedBox(height: 8),
const Text(
'No tournaments found',
style: TextStyle(fontSize: 16, color: Colors.grey),
),
],
),
),
),
),
const SizedBox(height: 16),
],
);
}
return Column(