stateUpdated method
When you call updateState, this method will be called within your
State. The data
parameter will contain any data passed from the
updateState method.
E.g. updateState('my_state', data: "Hello World");
stateUpdated(dynamic data) { data = "Hello World" }
Implementation
@override
stateUpdated(dynamic data) async {
super.stateUpdated(data);
if (data is! Map) return;
if (!data.containsKey('action') || data['action'] == null) return;
switch (data['action']) {
case 'reset-tab':
{
int index = data['tab-index'];
reset[index] = true;
break;
}
default:
{}
}
}