I’m engaged on an app which has the under dart recordsdata.
- Holderscreen.dart
- dashboard.dart
- Kitchen.dart
I’m passing the knowledge from the holder web page to the opposite pages like under
KitchenScreen(accessToken:widget.accessToken, userRes: tempUserRes, profileType: widget.profileType, ivString: widget.ivString, notifyParent: getUserDataForeignFunc),
On the initialization of the app and calling the getUserDate returns userRes which is a kind of future<map<string,dynamic> however after doing an replace in Kitchen display screen I recall the tactic in holder.dart file which refreshes/will get the userRes once more however this time it’s a sort of _map<string,dynamic> due to which the kitchen display screen exhibits the exception
════════ Exception caught by widgets library ═══════════════════════════════════
sort '_Map<String, dynamic>' is just not a subtype of sort 'Future<Map<String, dynamic>>'
right here is the tactic that is named within the holder.dart file
Future<Map<String, dynamic>> getUserData() async {
dynamic userRes;
userRes = await getUserProfileData(widget.accessToken, widget.ivString, widget.profileType);
return userRes;
}
Any thought what’s going on. Based mostly on strategies I’ll share my code as requested, dont wish to add quite a lot of code and trigger confusion for the neighborhood