I have a problem getting the List of Strings from the map on the function fromMap. Error: Unhandled Exception: type 'List' is not a subtype of type 'List'
class Ong {
final String nombre;
final List<String> PalabrasClave;
Ong({
required this.nombre,
required this.PalabrasClave,
});
Map<String, dynamic> toMap() {
return {
'Nombre': nombre,
'Palabras Clave': PalabrasClave,
};
}
factory Ong.fromMap(Map<String, dynamic> map) {
return Ong(
nombre: map['Nombre'],
PalabrasClave: map['Palabras Clave'],
);
}
¿How can I solve it?