resetState method
void
resetState()
The resetState() method is, as its name implies, used to revert the states of all the cards back to its default state(null).
Implementation
void resetState() {
_expanded.clear();
_expanded = _questionStructure.map((e) {
Map<Question, String?> temp = new Map<Question, String?>();
if (!(e is NestedQuestion || e is PolarQuestion))
e.answer = new TextEditingController();
temp[e] = null;
return temp;
}).toList();
notifyListeners();
}