added mounted check before setting state in choice_array
This commit is contained in:
parent
5d190cc51e
commit
3efe374302
1 changed files with 2 additions and 6 deletions
|
|
@ -44,17 +44,13 @@ class ChoicesArrayState extends State<ChoicesArray> {
|
|||
|
||||
void disableInteraction() {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
setState(() {
|
||||
interactionDisabled = true;
|
||||
});
|
||||
if (mounted) setState(() => interactionDisabled = true);
|
||||
});
|
||||
}
|
||||
|
||||
void enableInteractions() {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
setState(() {
|
||||
interactionDisabled = false;
|
||||
});
|
||||
if (mounted) setState(() => interactionDisabled = false);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue