quel-est-ce-pokemon/lib/core/config/app_constants.dart
Maxiwere45 a2a7ffd79f feat(i18n): add FR/EN internationalization with in-app language selector
- 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>
2026-06-23 12:13:51 +02:00

60 lines
1.8 KiB
Dart

/// Constantes globales de l'application, centralisées pour éviter les valeurs en dur.
class AppConstants {
AppConstants._();
/// Nombre total de Pokémon gérés (jusqu'à la Gen 9).
static const int totalPokemon = 1025;
/// Points gagnés pour une bonne réponse normale.
static const int pointsNormal = 10;
/// Points gagnés pour une bonne réponse sur un Pokémon shiny.
static const int pointsShiny = 20;
/// Nombre de vies au début d'une partie.
static const int startingLives = 3;
/// Nombre de skips au début d'une partie.
static const int startingSkips = 3;
/// Nombre d'indices au début d'une partie.
static const int startingHints = 3;
/// Une bonne réponse tous les N donne un indice bonus.
static const int hintBonusEvery = 5;
/// Une bonne réponse tous les N donne un skip bonus.
static const int skipBonusEvery = 10;
/// Probabilité d'apparition d'un shiny : 1 chance sur N.
static const int shinyOdds = 10;
/// Hôte de l'API Tyradex.
static const String apiBaseUrl = 'tyradex.app';
/// Chemin de l'endpoint Pokémon.
static const String apiPokemonPath = 'api/v1/pokemon';
/// Clé SharedPreferences pour le meilleur score.
static const String prefsBestScore = 'best_score';
/// Clé SharedPreferences pour le filtre de générations.
static const String prefsGenFilter = 'gen_filter';
/// Clé SharedPreferences pour la langue de l'application.
static const String prefsLocale = 'locale_code';
/// Plages d'IDs Pokémon par génération [min, max] (inclusif).
static const List<(int, int)> genRanges = [
(1, 151), // Gen 1
(152, 251), // Gen 2
(252, 386), // Gen 3
(387, 493), // Gen 4
(494, 649), // Gen 5
(650, 721), // Gen 6
(722, 809), // Gen 7
(810, 905), // Gen 8
(906, 1025), // Gen 9
];
}