fetchState method
dynamic
fetchState()
Fetches any parsed data from the previous component/page route as either a List or a Map.
Casting can be done afterwards to get the desired outcome
void init() {
dynamic data = fetchState();
if (data is Map) {
print(data['a']);
} else if (data is List) {
print(data[0]);
}
}
Implementation
dynamic fetchState() => r.fetchState();