I'm trying to add persistence to my app using firestore. It seems ace, but I've hit a bump in the road, and googling seems to be failing me. I think this may be more of a dart question than firestore, so please edit as you see fit!
Essentially I have a situation similar the following:
class attributes(){
double xpos, ypos;
String id;
}
class item(){
String name;
int price;
List<attributes> attributeHistory;
Map<String, dynamic> toMap(){
Map<String, dynamic> returnMap = new Map();
returnMap['name'] = name;
returnMap['price'] = price;
returnMap['attributeHistory'] = //what goes here??;
}
}
So... What goes there? I've written a .toMap function for attributes, but I don't know where that gets me!
Any ideas?