firebase实时数据库的更改在控制台中不可见
我正在学习使用Firebases实时数据库,并偶然发现了错误。如果我通过设置更改数据,这些更改在Firebase的控制台中不可见,但是如果我尝试访问通过Get Awere设置的数据,则可以。
这是这里的初始化代码
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
runApp(const MyApp());
}
是用于引用,设置和获取的代码
onPressed: () => {
print("button"),
FirebaseDatabase.instance
.ref("/")
.child("users")
.set({"name": "test", "int": 875})
.then((value) => print("set value"))
.onError((error, stackTrace) => print("$error, $stackTrace")),
FirebaseDatabase.instance
.ref("/")
.child("users")
.get()
.then((value) => print(value.value))
.onError((error, stackTrace) => print("$error, $stackTrace")),
},
I'm learning to use Firebases realtime database and stumbled upon an error. If I change data via set those changes aren't visible in the console of firebase but if i try to access the data I set via get everything is fine.
There`s where I want to see the changes
Here is the initialization code
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
runApp(const MyApp());
}
Here is the code for referencing, set and get
onPressed: () => {
print("button"),
FirebaseDatabase.instance
.ref("/")
.child("users")
.set({"name": "test", "int": 875})
.then((value) => print("set value"))
.onError((error, stackTrace) => print("$error, $stackTrace")),
FirebaseDatabase.instance
.ref("/")
.child("users")
.get()
.then((value) => print(value.value))
.onError((error, stackTrace) => print("$error, $stackTrace")),
},
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论