import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:shuffle/core/l10n/l10n.dart'; import 'package:shuffle/core/theme/app_spacing.dart'; import 'package:shuffle/features/auth/presentation/providers/sign_in_prompt_provider.dart'; import 'package:shuffle/features/auth/presentation/widgets/sign_in_prompt.dart'; /// Placeholder home screen. To be replaced by the catalog search / QUE-09. /// /// Reads only [showSignInPromptProvider]; the decision whether the sign-in /// prompt appears lives there (Spec #49 ยง 5.1). class HomeScreen extends ConsumerWidget { const HomeScreen({super.key}); @override Widget build(BuildContext context, WidgetRef ref) { final l10n = context.l10n; final showPrompt = ref.watch(showSignInPromptProvider); return Scaffold( key: const Key('home_screen'), appBar: AppBar(title: Text(l10n.appTitle)), body: SafeArea( child: LayoutBuilder( builder: (context, constraints) => SingleChildScrollView( padding: AppSpacing.pagePadding(constraints.maxWidth), child: ConstrainedBox( constraints: BoxConstraints( minHeight: constraints.maxHeight - AppSpacing.lg * 2, ), child: Center( child: Column( mainAxisSize: MainAxisSize.min, children: [ Text( l10n.homePlaceholderMessage, key: const Key('home_placeholder_message'), textAlign: TextAlign.center, ), if (showPrompt) ...[ const SizedBox(height: AppSpacing.xl), const SignInPrompt(), ], ], ), ), ), ), ), ), ); } }