re-enable choice notifier

This commit is contained in:
Ava Shilling 2026-01-22 13:42:54 -05:00
parent c881f61c4f
commit dd8d35962f
2 changed files with 28 additions and 22 deletions

View file

@ -121,6 +121,7 @@ class AnalyticsPracticeState extends State<AnalyticsPractice>
activityState.dispose();
activityTarget.dispose();
progressNotifier.dispose();
enableChoicesNotifier.dispose();
selectedMorphChoice.dispose();
super.dispose();
}

View file

@ -409,30 +409,35 @@ class _ActivityChoicesWidget extends StatelessWidget {
.clamp(50.0, 80.0);
return Column(
children: [
Expanded(
child: Column(
spacing: 4.0,
mainAxisAlignment: MainAxisAlignment.center,
children: choices
.map(
(choice) => _ChoiceCard(
activity: value,
targetId:
controller.choiceTargetId(choice.choiceId),
choiceId: choice.choiceId,
onPressed: () => controller.onSelectChoice(
choice.choiceId,
return ValueListenableBuilder(
valueListenable: controller.enableChoicesNotifier,
builder: (context, enabled, __) => Column(
children: [
Expanded(
child: Column(
spacing: 4.0,
mainAxisAlignment: MainAxisAlignment.center,
children: choices
.map(
(choice) => _ChoiceCard(
activity: value,
targetId: controller
.choiceTargetId(choice.choiceId),
choiceId: choice.choiceId,
onPressed: () => controller.onSelectChoice(
choice.choiceId,
),
cardHeight: cardHeight,
choiceText: choice.choiceText,
choiceEmoji: choice.choiceEmoji,
enabled: enabled,
),
cardHeight: cardHeight,
choiceText: choice.choiceText,
choiceEmoji: choice.choiceEmoji,
),
)
.toList(),
)
.toList(),
),
),
),
],
],
),
);
},
),