I want to conver the firebase incoming data from object? to Map<String , dynamic>. please help
fetchInitialNotificationData()async{
emit(NotificationLoading());
try{
reference.child("User").orderByKey().onValue.listen((event) {
final userNames =Map<String , dynamic>.from(event.snapshot.value);
print(userNames);
});
List<String> userList = [];
emit(NotificationContains(userList: userList));
}
catch(e){
print(e.toString());
}
}