Hi I am new to flutter and dart. I come from Java background. I am facing difficulty in typecasting maps. I have saved some data on Firestore in the format of
Map<String,List<String>>. In my flutter app when I am fetching this data, I am getting it in the format of
LinkedHashMap<dynamic,dynamic>. I want to convert this
LinkedHashMap into a
Map<String,List<String>>. I tried the Map.from() constructor but it is throwing exception
type 'List<dynamic>' is not a subtype of type 'List<String>'. Following is the line where I am attempting to typecast this.
Map<String, List<String>> values = Map<String, List<String>>.from(documentSnapshot.data['Watchlist']);
Please let me know if any more information is needed.