Browse Source

fix: guider

pull/46/head
AmirrezaChegini 6 days ago
parent
commit
3eb3be9f1f
  1. 8
      lib/core/widgets/answer_box/answer_box.dart
  2. 5
      lib/features/question/presentation/ui/screens/question_screen.dart

8
lib/core/widgets/answer_box/answer_box.dart

@ -16,6 +16,7 @@ class AnswerBox extends StatefulWidget {
required this.correctAnswer,
required this.index,
required this.globalKey,
required this.answerGlobalKey,
this.onTap,
this.onNotifTap,
});
@ -26,6 +27,7 @@ class AnswerBox extends StatefulWidget {
final int index;
final Function(AnswerEntity answer)? onNotifTap;
final GlobalKey globalKey;
final GlobalKey answerGlobalKey;
@override
State<AnswerBox> createState() => _AnswerBoxState();
@ -55,7 +57,10 @@ class _AnswerBoxState extends State<AnswerBox> {
child: Stack(
alignment: Alignment.topCenter,
children: [
AnswerPictureBox(
MyShowcaseWidget(
globalKey: widget.answerGlobalKey,
description: context.translate.showcase_answer,
child: AnswerPictureBox(
selected: selected,
index: widget.index,
image: widget.answer.image ?? '',
@ -64,6 +69,7 @@ class _AnswerBoxState extends State<AnswerBox> {
widget.onNotifTap?.call(widget.answer);
},
),
),
Positioned(
left: 0,
right: 0,

5
lib/features/question/presentation/ui/screens/question_screen.dart

@ -161,11 +161,9 @@ class _QuestionScreenState extends State<QuestionScreen> with TickerProviderStat
key: Key('${state.currentQuestion?.id}'),
controller: context.read<QuestionBloc>().answerAnimationController,
index: index,
child: MyShowcaseWidget(
globalKey: context.read<QuestionBloc>().showCaseKey['answer_key_$index']!,
description: context.translate.showcase_answer,
child: AnswerBox(
globalKey: context.read<QuestionBloc>().showCaseKey['notif_key_$index']!,
answerGlobalKey: context.read<QuestionBloc>().showCaseKey['answer_key_$index']!,
index: state.currentQuestion?.answers?[index].order ?? 1,
answer:
state.currentQuestion?.answers?[index] ??
@ -184,7 +182,6 @@ class _QuestionScreenState extends State<QuestionScreen> with TickerProviderStat
),
),
),
),
);
}

Loading…
Cancel
Save