Я пытаюсь сделать простой пост-запрос из приложения флаттера в базу данных Firebase.
Это мой код:
child: RaisedButton(
child:Text('A firebase'),
textColor: Colors.blueGrey,
onPressed: () {
var url = "https://gip-reports.firebaseio.com/reporte.json";
http.post(url, body: {"name": "doodle", "color": "blue"})
.then((response) {
print("Response status: ${response.statusCode}");
print("Response body: ${response.body}");
});
},
),
Проблема в том, что когда я использую этот код, cmd показывает эту ошибку:
I/flutter (16602): Response status: 401
I/flutter (16602): Response body: {
I/flutter (16602): "error" : "Permission denied"
I/flutter (16602): }
Как я могу получить свое приложение для публикации в firebase?