ponshu-room-lite/lib/constants/app_constants.dart

89 lines
2.9 KiB
Dart
Raw Normal View History

/// アプリケーション全体で使用する定数を定義
///
/// マジックナンバーをここに集約することで、保守性と一貫性を向上させます。
///
/// 使用例:
/// ```dart
/// import '../constants/app_constants.dart';
///
/// final quality = AppConstants.imageCompressionQuality;
/// ```
class AppConstants {
// Private constructor to prevent instantiation
AppConstants._();
// ===== 画像圧縮設定 =====
/// JPEG圧縮品質デフォルト
///
/// 品質と容量のバランスを考慮した値
/// - 使用箇所: セット商品ダイアログ、ギャラリー画像選択
static const int imageCompressionQuality = 85;
/// 画像最大サイズ - Gemini API用長辺
///
/// Gemini APIのトークン消費を削減するため、1024pxに制限
/// - 使用箇所: カメラ撮影、OCR処理
static const int imageMaxDimensionGemini = 1024;
/// 画像最大サイズ - ギャラリー用(長辺)
///
/// 高品質表示と容量削減のバランス
/// - 使用箇所: ギャラリー画像選択(将来実装予定)
static const int imageMaxDimensionGallery = 2000;
/// ギャラリー画像圧縮品質
///
/// より高品質な保存用
/// - 使用箇所: ギャラリー画像の圧縮処理
static const int imageCompressionQualityGallery = 90;
// ===== 機能制限設定 =====
/// MBTI診断の最小件数
///
/// 診断精度を確保するために必要な最小データ数
/// - 使用箇所: ソムリエ画面AIソムリエ診断
static const int mbtiMinimumRecords = 5;
/// レコメンド表示件数
///
/// 詳細画面で表示するレコメンドの最大数
/// - 使用箇所: sake_detail_screen.dart
static const int recommendationLimit = 10;
// ===== バッジ取得条件 =====
/// バッジ「コレクター」取得に必要な件数
///
/// 50本以上登録でバッジ解除
/// - 使用箇所: gamification_service.dart
static const int collectorBadgeThreshold = 50;
/// 辛口サムライバッジの日本酒度閾値
///
/// 日本酒度 +5.0以上の日本酒を一定数飲んだユーザー向け
/// - 使用箇所: gamification_service.dart
static const double dryTypeSakeMeterThreshold = 5.0;
// ===== UI設定 =====
/// 開発者モード起動に必要なタップ回数
///
/// 設定画面のバージョン表示を連続タップでデバッグメニュー表示
/// - 使用箇所: other_settings_section.dart
static const int devModeTapCount = 5;
/// 信頼度スコア閾値(高)
///
/// OCR認識結果の信頼度が80%以上で高精度と判定
/// - 使用箇所: sake_detail_screen.dart
static const int confidenceScoreHigh = 80;
/// 信頼度スコア閾値(中)
///
/// OCR認識結果の信頼度が50%以上で中程度と判定
/// - 使用箇所: sake_detail_screen.dart
static const int confidenceScoreMedium = 50;
}