- gen-l10n setup (flutter_localizations, intl, l10n.yaml, ARB en/fr) - localeProvider (persisted) wired into MaterialApp - language selector in the System page (alongside the color palette) - all user-facing strings across screens moved to AppLocalizations Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
42 lines
1.3 KiB
Dart
42 lines
1.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
import '../../../l10n/app_localizations.dart';
|
|
|
|
/// Encart affichant le score courant et le meilleur score personnel.
|
|
class ScoreBoard extends StatelessWidget {
|
|
final int currentScore;
|
|
final int bestScore;
|
|
|
|
const ScoreBoard({super.key, required this.currentScore, required this.bestScore});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final l = AppLocalizations.of(context)!;
|
|
return Container(
|
|
width: double.infinity,
|
|
padding: const EdgeInsets.all(16),
|
|
decoration: BoxDecoration(
|
|
color: Colors.white.withAlpha(153),
|
|
border: Border.all(color: Colors.black12),
|
|
borderRadius: BorderRadius.circular(8),
|
|
),
|
|
child: Column(
|
|
children: [
|
|
Text(
|
|
l.currentScore,
|
|
style: const TextStyle(color: Colors.black54, fontSize: 14, fontWeight: FontWeight.bold),
|
|
),
|
|
Text(
|
|
"$currentScore",
|
|
style: const TextStyle(fontSize: 32, fontWeight: FontWeight.bold, color: Color(0xFF3B6EE3)),
|
|
),
|
|
const Divider(height: 24),
|
|
Text(
|
|
l.personalBest(bestScore),
|
|
style: const TextStyle(fontSize: 18, fontWeight: FontWeight.bold, color: Colors.black87),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|