首頁 Flutter【Flutter】解決 Bad state: field does not exist within the DocumentSnapshotPlatform231 點閱數 培哥2023年12月5日 修改前DocumentSnapshot snapshot = await db.collection('col').doc('doc').get(); print(snapshot['name']);修改後DocumentSnapshot snapshot = await db.collection('col').doc('doc').get(); var data = snapshot.data() as Map<String, dynamic>; print(data['name']);