re-enable choice notifier
This commit is contained in:
parent
c881f61c4f
commit
dd8d35962f
2 changed files with 28 additions and 22 deletions
|
|
@ -121,6 +121,7 @@ class AnalyticsPracticeState extends State<AnalyticsPractice>
|
|||
activityState.dispose();
|
||||
activityTarget.dispose();
|
||||
progressNotifier.dispose();
|
||||
enableChoicesNotifier.dispose();
|
||||
selectedMorphChoice.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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(),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue