【发布时间】:2019-09-15 01:48:01
【问题描述】:
我想检查类似 (database.reference().child('classData')) 的路径是否存在。如果它不存在,我想返回 null
我试过了
(database.reference().child('classData') == null ) 在 if 语句中没有任何反应。
【问题讨论】:
-
只需对该位置执行正常读取并检查该值,如果为 null 则表示它不存在
标签: android firebase firebase-realtime-database flutter