feat: simplify list item — accurate info only, remove AI-inferred tags
- 酒蔵 · 都道府県: / → · 区切りに変更(詳細画面と統一) - フレーバータグ削除: AI推測精度が低いため一覧から除去(詳細画面のみ) - 特定名称 + アルコール度数を追加: ラベル直読みの正確な情報のみ表示 (どちらか一方のみの場合も対応、両方ない場合は行自体を非表示) - セット商品の説明文は維持(ユーザー入力のため) - お気に入りアイコンは現状(右上)のまま維持 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
818f8862a1
commit
a691be07fa
|
|
@ -161,49 +161,34 @@ class SakeListItem extends ConsumerWidget {
|
||||||
const Icon(Icons.favorite, color: Colors.pink, size: 16),
|
const Icon(Icons.favorite, color: Colors.pink, size: 16),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: AppTheme.spacingTiny),
|
const SizedBox(height: 3),
|
||||||
// Brand / Prefecture (セット商品では非表示)
|
// 酒蔵 · 都道府県(セット商品では非表示)
|
||||||
if (sake.itemType != ItemType.set &&
|
if (sake.itemType != ItemType.set &&
|
||||||
(sake.displayData.displayBrewery.isNotEmpty || sake.displayData.displayPrefecture.isNotEmpty))
|
(sake.displayData.displayBrewery.isNotEmpty || sake.displayData.displayPrefecture.isNotEmpty))
|
||||||
Row(
|
Text(
|
||||||
children: [
|
'${sake.displayData.displayBrewery} · ${sake.displayData.displayPrefecture}',
|
||||||
Expanded(
|
style: Theme.of(context).textTheme.bodySmall?.copyWith(
|
||||||
child: Text(
|
color: appColors.textSecondary,
|
||||||
'${sake.displayData.displayBrewery} / ${sake.displayData.displayPrefecture}',
|
),
|
||||||
style: Theme.of(context).textTheme.bodySmall,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
|
maxLines: 1,
|
||||||
),
|
),
|
||||||
),
|
// セット商品の説明文(ユーザー入力のため維持)
|
||||||
],
|
|
||||||
),
|
|
||||||
// セット商品の説明文表示
|
|
||||||
if (sake.itemType == ItemType.set && sake.displayData.catchCopy != null)
|
if (sake.itemType == ItemType.set && sake.displayData.catchCopy != null)
|
||||||
Text(
|
Text(
|
||||||
sake.displayData.catchCopy!,
|
sake.displayData.catchCopy!,
|
||||||
style: Theme.of(context).textTheme.bodySmall?.copyWith(
|
style: Theme.of(context).textTheme.bodySmall?.copyWith(
|
||||||
|
color: appColors.textSecondary,
|
||||||
fontStyle: FontStyle.italic,
|
fontStyle: FontStyle.italic,
|
||||||
),
|
),
|
||||||
maxLines: 2,
|
maxLines: 2,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
if (!isMenuMode && sake.hiddenSpecs.flavorTags.isNotEmpty) ...[
|
// 特定名称 + アルコール度数(ラベルから直接読んだ正確な情報)
|
||||||
const SizedBox(height: AppTheme.spacingSmall),
|
if (!isMenuMode && sake.itemType != ItemType.set) ...[
|
||||||
Wrap(
|
const SizedBox(height: 6),
|
||||||
spacing: 4,
|
_buildSpecLine(context, appColors),
|
||||||
runSpacing: 4,
|
],
|
||||||
children: sake.hiddenSpecs.flavorTags.take(3).map((tag) => Container(
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 2),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: appColors.surfaceSubtle,
|
|
||||||
borderRadius: BorderRadius.circular(4),
|
|
||||||
),
|
|
||||||
child: Text(
|
|
||||||
tag,
|
|
||||||
style: TextStyle(fontSize: 10, color: appColors.textSecondary),
|
|
||||||
),
|
|
||||||
)).toList(),
|
|
||||||
)
|
|
||||||
]
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -214,4 +199,27 @@ class SakeListItem extends ConsumerWidget {
|
||||||
), // Card
|
), // Card
|
||||||
); // Pressable
|
); // Pressable
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 特定名称 + アルコール度数(どちらもある場合は両方、片方のみも対応)
|
||||||
|
Widget _buildSpecLine(BuildContext context, AppColors appColors) {
|
||||||
|
final type = sake.hiddenSpecs.type;
|
||||||
|
final alcohol = sake.hiddenSpecs.alcoholContent;
|
||||||
|
|
||||||
|
final parts = <String>[];
|
||||||
|
if (type != null && type.isNotEmpty) parts.add(type);
|
||||||
|
if (alcohol != null) parts.add('${alcohol.toStringAsFixed(alcohol.truncateToDouble() == alcohol ? 0 : 1)}%');
|
||||||
|
|
||||||
|
if (parts.isEmpty) return const SizedBox.shrink();
|
||||||
|
|
||||||
|
return Text(
|
||||||
|
parts.join(' · '),
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 11,
|
||||||
|
color: appColors.textSecondary,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
),
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
maxLines: 1,
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue