type '_JsonQuerySnapshot' is not a subtype of type 'Map<String, dynamic>' in type cast"

try snapshot.data to snapshot.data!.data()