import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import '../../l10n/gen/app_localizations.dart'; import '../../state/providers.dart'; import 'season_map_screen.dart'; class HomeScreen extends ConsumerWidget { const HomeScreen({super.key}); @override Widget build(BuildContext context, WidgetRef ref) { final l10n = AppLocalizations.of(context)!; final streak = ref.watch(streakProvider); return Scaffold( body: SafeArea( child: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ Text( l10n.appTitle, style: Theme.of(context).textTheme.displaySmall?.copyWith( fontWeight: FontWeight.bold, ), ), if (streak.current > 0) ...[ const SizedBox(height: 12), Chip( avatar: const Icon( Icons.local_fire_department, color: Colors.deepOrange, size: 20, ), label: Text( '${streak.current}', style: Theme.of(context).textTheme.titleMedium, ), ), ], const SizedBox(height: 48), FilledButton( style: FilledButton.styleFrom( padding: const EdgeInsets.symmetric( horizontal: 48, vertical: 16, ), textStyle: Theme.of(context).textTheme.titleLarge, ), onPressed: () { Navigator.of(context).push( MaterialPageRoute( builder: (_) => const SeasonMapScreen(), ), ); }, child: Text(l10n.play), ), ], ), ), ), ); } }