All checks were successful
Correct the focus comment (refs #61), test Space key and focus state, prove scrollability at 200 percent text, drop needless minWidth, English doc comment, allow OutlinedButton as secondary action in standalone cards, English prompt text says plays instead of games. Refs #49 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
52 lines
1.9 KiB
Dart
52 lines
1.9 KiB
Dart
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(),
|
|
],
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|