Hi When I get the data from Firebase, it gives an error. The codes are as follows. where do you think i am going wrong
Map<String, dynamic> toMap() {
return {
"aciklama": aciklama,
"fiyat": fiyat,
"aciklamaDate": aciklamaDate ?? FieldValue.serverTimestamp(),
"kim": kim,
};
}
Vergi.fromMap(DocumentSnapshot snapshot)
: aciklama = snapshot["aciklama"],
fiyat = snapshot["fiyat"],
aciklamaDate = snapshot["aciklamaDate"].toDate(),
kim = snapshot["kim"];
codes in data list:
Row(
children: [
Spacer(),
Text(
DateFormat("dd/MM/yyyy").format(
data["aciklamaDate"].toDate()
),
style: TextStyle(
color: Colors.black
.withOpacity(0.5),
),
)
],
),