I would like to write data in Firebase and I get a permission error, here is what I tried :

```
void initState() {
    super.initState();
    testFirebase();
 }

 Future testFirebase() async {

    initUser();

    //Initialize Firebase
    final FirebaseApp firebaseApp = await FirebaseApp.configure( ... );

    final FirebaseDatabase database = new FirebaseDatabase(app: firebaseApp);

    database.reference().child('counter').push().set(<String, String>{
      'var': 'test'
    });
  }

  Future initUser() async {
    googleUser = await _ensureLoggedInOnStartUp();
    if (googleUser == null) {
       setState(() {
         state.isLoading = false;
       });
    } else {
       var firebaseUser = await logIntoFirebase();
    }
  }

```

**Here is my Firebase rules :**

[![enter image description here](https://i.stack.imgur.com/CV9sG.png)](https://i.stack.imgur.com/CV9sG.png)

The google-services.json file is added to the app root directory :

[![enter image description here](https://i.stack.imgur.com/ubQkI.png)](https://i.stack.imgur.com/ubQkI.png)

**Result :**

I get the following error message :

[![enter image description here](https://i.stack.imgur.com/FViXC.png)](https://i.stack.imgur.com/FViXC.png)

**I tried also with :** 

> 
> push().setValue('2')
> 
> 
> 

but it doesn't work and that makes me crazy, I don't understand...

Any idea?