null safety
This commit is contained in:
@@ -20,14 +20,14 @@ class MarketModel extends BaseModel {
|
||||
try {
|
||||
if (listener != null) listener.cancel();
|
||||
|
||||
listener = Firestore.instance
|
||||
listener = FirebaseFirestore.instance
|
||||
.collection("/$config_collection/$setting_doc_id/$markets_collection")
|
||||
.snapshots()
|
||||
.listen((QuerySnapshot snapshot) {
|
||||
markets.clear();
|
||||
markets = snapshot.documents.map((documentSnapshot) {
|
||||
markets = snapshot.docs.map((documentSnapshot) {
|
||||
var user = Market.fromMap(
|
||||
documentSnapshot.data, documentSnapshot.documentID);
|
||||
documentSnapshot.data as Map<String, dynamic>, documentSnapshot.id);
|
||||
return user;
|
||||
}).toList();
|
||||
notifyListeners();
|
||||
|
||||
Reference in New Issue
Block a user