develop #1
|
@ -36,7 +36,10 @@ class QuizItemComponent extends StatelessWidget {
|
|||
const SizedBox(height: 12),
|
||||
_buildAnswerIndicator(),
|
||||
const SizedBox(height: 16),
|
||||
const Divider(height: 24),
|
||||
const Divider(
|
||||
height: 24,
|
||||
color: AppColors.shadowPrimary,
|
||||
),
|
||||
_buildMetadata(),
|
||||
],
|
||||
),
|
||||
|
@ -59,14 +62,22 @@ class QuizItemComponent extends StatelessWidget {
|
|||
final int index = entry.key;
|
||||
final String text = entry.value;
|
||||
|
||||
final isCorrect = index == item.targetAnswer;
|
||||
final isWrong = index == item.userAnswer && !isCorrect;
|
||||
final bool isCorrectAnswer = index == item.targetAnswer;
|
||||
final bool isUserWrongAnswer = index == item.userAnswer && !isCorrectAnswer;
|
||||
|
||||
final Color? backgroundColor = isCorrect
|
||||
? AppColors.primaryBlue.withValues(alpha: 0.15)
|
||||
: isWrong
|
||||
? Colors.red.withValues(alpha: 0.15)
|
||||
: null;
|
||||
Color? backgroundColor;
|
||||
IconData icon = LucideIcons.circle;
|
||||
Color iconColor = AppColors.shadowPrimary;
|
||||
|
||||
if (isCorrectAnswer) {
|
||||
backgroundColor = AppColors.primaryBlue.withValues(alpha: 0.15);
|
||||
icon = LucideIcons.checkCircle2;
|
||||
iconColor = AppColors.primaryBlue;
|
||||
} else if (isUserWrongAnswer) {
|
||||
backgroundColor = Colors.red.withValues(alpha: 0.15);
|
||||
icon = LucideIcons.xCircle;
|
||||
iconColor = Colors.red;
|
||||
}
|
||||
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
|
@ -75,14 +86,14 @@ class QuizItemComponent extends StatelessWidget {
|
|||
decoration: BoxDecoration(
|
||||
color: backgroundColor,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(color: Colors.grey.shade300),
|
||||
border: Border.all(color: AppColors.shadowPrimary),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
LucideIcons.circle,
|
||||
icon,
|
||||
size: 16,
|
||||
color: Colors.grey.shade600,
|
||||
color: iconColor,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Flexible(
|
||||
|
|
Loading…
Reference in New Issue