In this example below which unmaps the json from Firebase.
Everywhere where I get data as Map<String, dynamic>
- like orderId
- its ok.
But everywhere where I have map inside another map - like address
- it gives me a warning
"Avoid method calls or property accesses on a "dynamic" target."
Its not critical but I found on google that it provokes productivity penalties. Can someone share why it is so and how to avoid it
Order.fromMap(Map<String, dynamic> data) {
orderId = data['orderId'] as int;
address = data['location']['address'].toString();
}